musl/ldso
Szabolcs Nagy f2435263d7 make relocation time symbol lookup and dlsym consistent
Using common code path for all symbol lookups fixes three dlsym issues:

- st_shndx of STT_TLS symbols were not checked and thus an undefined
  tls symbol reference could be incorrectly treated as a definition
  (the sysv hash lookup returns undefined symbols, gnu does not, so should
  be rare in practice).

- symbol binding was not checked so a hidden symbol may be returned
  (in principle STB_LOCAL symbols may appear in the dynamic symbol table
  for hidden symbols, but linkers most likely don't produce it).

- mips specific behaviour was not applied (ARCH_SYM_REJECT_UND) so
  undefined symbols may be returned on mips.

always_inline is used to avoid relocation performance regression, the
code generation for find_sym should not be affected.
2019-08-12 18:25:38 -04:00
..
dlstart.c define and use internal macros for hidden visibility, weak refs 2018-09-05 14:05:14 -04:00
dynlink.c make relocation time symbol lookup and dlsym consistent 2019-08-12 18:25:38 -04:00