summaryrefslogtreecommitdiff
path: root/src/ldso/dl_iterate_phdr.c
AgeCommit message (Collapse)AuthorLines
2018-09-05define and use internal macros for hidden visibility, weak refsRich Felker-2/+1
this cleans up what had become widespread direct inline use of "GNU C" style attributes directly in the source, and lowers the barrier to increased use of hidden visibility, which will be useful to recovering some of the efficiency lost when the protected visibility hack was dropped in commit dc2f368e565c37728b0d620380b849c3a1ddd78f, especially on archs where the PLT ABI is costly.
2017-04-11fix dl_iterate_phdr in static PIE binariesRich Felker-0/+5
analogous to commit 5bf7eba213cacc4c1220627c91c28deff2ffecda, use of AT_PHDR/PT_PHDR does not actually work to find the program base, and the method with _DYNAMIC vs PT_DYNAMIC must be used as an alternative. patch by Shiz, along with testing to confirm that this fixes unwinding in static PIE.
2017-03-14in static dl_iterate_phdr, fix use of possibly-uninitialized aux dataRich Felker-1/+1
this could only happen if an incomplete auxv was passed into the program, but it's better to just initialize the data anyway.
2016-01-25adapt static dl_iterate_phdr not to depend on !defined(SHARED)Rich Felker-4/+3
like elsewhere, use a weak alias that the dynamic linker will override with a more complete version capable of handling shared libraries.
2012-10-31add dl_iterate_phdr interfaceRich Felker-0/+43
patches by Alex Caudill (npx). the dynamic-linked version is almost identical to the final submitted patch; I just added a couple missing lines for saving the phdr address when the dynamic linker is invoked directly to run a program, and removed a couple to avoid introducing another unnecessary type. the static-linked version is based on npx's draft. it could use some improvements which are contingent on the startup code saving some additional information for later use.