HomeFreeBSD

MFC r326496:

Description

MFC r326496:

Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.

MFC r326831:

Pull in r315334 from upstream lld trunk (by Rafael Espindola):

Don't create a dummy __tls_get_addr.

We just don't need one with the current setup.

We only error on undefined references that are used by some
relocation.

If we managed to relax all uses of __tls_get_addr, no relocation uses
it and we don't produce an error.

This is less code and fixes the case were we fail to relax. Before we
would produce a broken output, but now we produce an error.

Pull in r320390 from upstream lld trunk (by Rafael Espindola):

Create reserved symbols early so they can be versioned.

This fixes pr35570.

We were creating these symbols after parsing version scripts, so they
could not be versioned.

We cannot move the version script parsing later because we need it for
lto.

One option is to move both addReservedSymbols and
createSyntheticSections earlier. The disadvantage is that some
sections created by createSyntheticSections replace other input
sections. For example, gdb index replaces .debug_gnu_pubnames, so it
wants to run after gc sections so that it can set S->Live to false.

What this patch does instead is to move just the ElfHeader creation
early.

Pull in r320412 from upstream lld trunk (by Rafael Espindola):

Handle symbols pointing to output sections.

Now that gc sections runs after linker defined symbols are added it
can see symbols that point to an OutputSection.

Should fix a bot failure.

Pull in r320431 from upstream lld trunk (by Peter Collingbourne):

ELF: Do not follow relocation edges to output sections during GC.

This fixes an assertion error introduced by r320390.

Differential Revision: https://reviews.llvm.org/D41095

Together these fix handling of reserved symbols, in particular _end,
which is needed to make brk(2) and sbrk(2) work correctly. This
unbreaks the emacs ports on amd64, and also appears to unbreak most of
world on i386.

Differential Revision: https://reviews.freebsd.org/D13466

MFC r326879 (by emaste):

lld: Simplify a boolean expression by De Morgan's laws.

Cherry-pick lld r315653 by Rui Ueyama:

I don't really understand what exactly this expression means,
but at least I can mechanically transform it.

Obtained from: LLVM r315653

MFC r326897 (by emaste):

lld: Slightly simplify code and add comment.

Cherry-pick lld r315658 by Rui Ueyama:

This is not a mechanical transformation. Even though I believe this
patch is correct, I'm not 100% sure if lld with this patch behaves
exactly the same way as before on all edge cases. At least all tests
still pass.

I'm submitting this patch because it took almost a day to understand
this function, and I don't want to lose it.

This fixes jemalloc assertion failures observed at startup with i386
binaries and an lld-linked libc.so.

Reviewed by: dim
Obtained from: LLVM r315658
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D13503

MFC r326909:

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
5.0.1 release (upstream r320880).

Relnotes: yes

MFC r326957 (by emaste):

lld: Don't write preemptible symbol values to the .got.

It is not necessary and matches what bfd and gold do.

This was a regression from [LLVM] r315658.

Obtained from: LLVM r321023 by Rafael EspĂ­ndola

Details

Provenance
dimAuthored on
Reviewer
dim
Differential Revision
D13466: Apply upstream lld fixes for correct _end handling
Parents
rS327203: Allow the first (and second) argument of sn_calloc() be a sum.
Branches
Unknown
Tags
Unknown