diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2017-12-19 18:43:04 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2018-01-12 18:10:03 +0000 |
commit | 3d1d79283e6de4f7c434cb67fb53a4fd28359669 (patch) | |
tree | 598fa6d1c3adb8e8738560b74ce0080bad24fd07 /posix/fnmatch.h | |
parent | 52a713fdd0a30e1bd79818e2e3c4ab44ddca1a94 (diff) | |
download | glibc-3d1d79283e6de4f7c434cb67fb53a4fd28359669.tar glibc-3d1d79283e6de4f7c434cb67fb53a4fd28359669.tar.gz glibc-3d1d79283e6de4f7c434cb67fb53a4fd28359669.tar.bz2 glibc-3d1d79283e6de4f7c434cb67fb53a4fd28359669.zip |
aarch64: fix static pie enabled libc when main is in a shared library
In the static pie enabled libc, crt1.o uses the same position independent
code as rcrt1.o and crt1.o is used instead of Scrt1.o when -no-pie
executables are linked. When main is not defined in the executable, but
in a shared library crt1.o is currently broken, it assumes main is local.
(glibc has a test for this but i missed it in my previous testing.)
To make both rcrt1.o and crt1.o happy with the same code, a wrapper is
introduced around main: with this crt1.o works with extern main symbol
while rcrt1.o does not depend on GOT relocations. (The change only
affects static pie enabled libc. Further simplification of start.S is
possible in the future by using the same approach for Scrt1.o too.)
* aarch64/start.S (_start): Use __wrap_main.
(__wrap_main): New local symbol.
Diffstat (limited to 'posix/fnmatch.h')
0 files changed, 0 insertions, 0 deletions