Skip to content
Commit 321b9cd0 authored by Rui Ueyama's avatar Rui Ueyama
Browse files

Export __progname even if a -dynamic-list is given.

BSD's __progname symbol is defined in crt1.o and linked against main
executables. The libc expects that main executables export __progname
symbol via .dynsym sections. In order to handle this case, we scan
undefined symbols in DSOs and exported them by setting Sym->ExportDynamic
to true.

But it turned out that setting that variable is not enough to make sure
that symbols are exported in all use cases. If a -dynamic-list option is
given, all symbols not explicitly mentioned in a version script are
hidden by default. That hides __progname symbol. This patch fixes the issue.

Fixes https://bugs.llvm.org/show_bug.cgi?id=32703

llvm-svn: 301282
parent bbebcb6c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment