Files
clang-p2996/lld/test/ELF
Fangrui Song 0fbf28f7aa [ELF] --no-dynamic-linker: don't emit undefined weak symbols to .dynsym
I felt really sad to push this commit for my selfish purpose to make
glibc -static-pie build with lld. Some code constructs in glibc require
R_X86_64_GOTPCREL/R_X86_64_REX_GOTPCRELX referencing undefined weak to
be resolved to a GOT entry not relocated by R_X86_64_GLOB_DAT (GNU ld
behavior), e.g.

csu/libc-start.c
  if (__pthread_initialize_minimal != NULL)
    __pthread_initialize_minimal ();

elf/dl-object.c
  void
  _dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid)
  {
    /* We modify the list of loaded objects.  */
    __rtld_lock_lock_recursive (GL(dl_load_write_lock));

Emitting a GLOB_DAT will make the address equal &__ehdr_start (true
value) and cause elf/ldconfig to segfault. glibc really should move away
from weak references, which do not have defined semantics.

Temporarily special case --no-dynamic-linker.
2020-01-23 12:25:15 -08:00
..
2018-07-05 16:03:20 +00:00
2019-07-22 11:37:03 +00:00
2019-07-22 11:37:03 +00:00
2019-07-22 11:37:03 +00:00
2019-07-22 11:37:03 +00:00
2019-07-22 11:37:03 +00:00
2019-09-07 10:42:11 +00:00
2019-09-07 10:42:11 +00:00
2019-08-01 09:25:34 +00:00
2019-08-01 09:25:34 +00:00
2019-09-07 10:42:11 +00:00
2018-08-08 14:50:33 +00:00
2018-08-08 14:50:33 +00:00
2018-08-08 14:50:33 +00:00
2018-08-08 14:50:33 +00:00
2019-09-07 10:42:11 +00:00
2019-07-25 07:12:23 +00:00
2019-09-07 10:42:11 +00:00
2019-09-07 10:42:11 +00:00
2019-07-16 05:58:03 +00:00
2019-02-06 01:00:49 +00:00
2020-01-10 14:59:58 +00:00
2019-09-07 10:42:11 +00:00
2019-09-12 08:55:17 +00:00