HomePhabricator

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

Description

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

Details

Auditors
Bigcheese
Committed
ruiuApr 24 2017, 5:15 PM
Parents
rL301281: Teach SCEV normalization to de/normalize non-affine add recs
Branches
Unknown
Tags
Unknown