glibc:maskray/lld

Last commit made on 2021-02-01
Get this branch:
git clone -b maskray/lld https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
maskray/lld
Repository:
lp:glibc

Recent commits

6f2a128... by Fangrui Song <email address hidden> on 2020-03-13

configure: Allow LD to be LLD 9.0.0 or above

When using LLD (LLVM linker) as the linker, configure prints a confusing
message.

    *** These critical programs are missing or too old: GNU ld

LLD>=9.0.0 can build glibc with very few patches. (LLD 8.0.0 needs one
workaround for -Wl,-defsym=_begin=0). LLD>=9.0.0 is available on many
distributions, so just set the baseline version to 9.0.0.

c67127a... by Siva Chandra Reddy <email address hidden> on 2021-01-29

csu: Skip ARCH_SETUP_IREL if _dl_relocate_static_pie applied IRELATIVE relocations

For static pie, _dl_relocate_static_pie applies IRELATIVE relocations so
ARCH_SETUP_IREL should not apply relocations again.

LLD defines __rela_iplt_start/__rela_iplt_end regardless of -no-pie or
-pie, so in an LLD linked static pie, ARCH_SETUP_IREL would otherwise
apply the relocations in the range of [__rela_iplt_start,
__rela_iplt_end).

Co-authored-by: Fangrui Song <email address hidden>

02d393f... by Fangrui Song <email address hidden> on 2021-02-01

elf: Replace a --defsym trick with an object file to be compatible with LLD

The existing code specifies -Wl,--defsym=malloc=0 and other malloc.os
definitions before libc_pic.a so that libc_pic.a(malloc.os) is not
fetched. This trick is used to avoid multiple definition errors which
would happen as a chain result:

  dl-allobjs.os has an undefined __libc_scratch_buffer_set_array_size
  __libc_scratch_buffer_set_array_size fetches libc_pic.a(scratch_buffer_set_array_size.os)
  libc_pic.a(scratch_buffer_set_array_size.os) has an undefined free
  free fetches libc_pic.a(malloc.os)
  libc_pic.a(malloc.os) has an undefined __libc_message
  __libc_message fetches libc_pic.a(libc_fatal.os)

  libc_fatal.os will cause a multiple definition error (__GI___libc_fatal)
  >>> defined at dl-fxstatat64.c
  >>> /tmp/p/glibc/Release/elf/dl-allobjs.os:(__GI___libc_fatal)
  >>> defined at libc_fatal.c
  >>> libc_fatal.os:(.text+0x240) in archive /tmp/p/glibc/Release/libc_pic.a

LLD processes --defsym after all input files, so this trick does not
suppress multiple definition errors with LLD. Split the step into two
and use an object file to make the intention more obvious and make LLD
work.

This is conceptually more appropriate because --defsym defines a SHN_ABS
symbol while a normal definition is relative to the image base.

See https://sourceware.org/pipermail/libc-alpha/2020-March/111910.html
for discussions about the --defsym semantics.

Reviewed-by: Adhemerval Zanella <email address hidden>
Reviewed-by: H.J. Lu <email address hidden>

2edf8f3... by Adhemerval Zanella on 2021-02-01

Open master branch for glibc 2.34 development

9826b03... by Adhemerval Zanella on 2021-02-01

Prepare for glibc 2.33 release

Update version.h, features.h, and ChangeLog.old/ChangeLog.22.

5e25920... by Adhemerval Zanella on 2021-02-01

Update NEWS with bugs

730ad88... by Adhemerval Zanella on 2021-02-01

Update translations

Add missing Serbian translation.

934c48a... by Florian Weimer on 2021-01-29

NEWS: Fix typo in CVE-2021-3326 entry

a50a080... by Adhemerval Zanella on 2021-01-29

elf: Fix tests that rely on ld.so.cache for cross-compiling

For configurations with cross-compiling equal to 'maybe' or 'no',
ldconfig will not run and thus the ld.so.cache will not be created
on the container testroot.pristine.

This lead to failures on both tst-glibc-hwcaps-prepend-cache and
tst-ldconfig-ld_so_conf-update on environments where the same
compiler can be used to build different ABIs (powerpc and x86 for
instance).

This patch addas a new test-container hook, ldconfig.run, that
triggers a ldconfig execution prior the test execution.

Checked on x86_64-linux-gnu and i686-linux-gnu.

d7f4f3f... by Florian Weimer on 2021-01-29

NEWS: Mention CVE-2021-3326 (iconv assertion with ISO-20220-JP-3)