objdump -h relies heavily on BFD internals and the BFD flags are difficult to
emulate in llvm-objdump.
llvm-objdump -h has a different output (https://reviews.llvm.org/D57146)
Switch to readelf, which is generally better than objdump when dumping ELF
section/symbol information.
Signed-off-by: F
This improves the portability of the linker script and allows lld to link rom.o
Dot assignment inside an output section has an inconsistent behavior
which makes lld difficult to implement.
See https://bugs.llvm.org/show_bug.cgi?id=43083
Dropping `. =` turns out to be beneficial to older GNU ld as
(1) In romlayout.S, .fixedaddr.\addr sections do have not the SHF_ALLOC flag.
It does not make sense to reference a SHF_ALLOC section from a non-SHF_ALLOC
section via R_386_PC16.
GNU ld allows it but lld will warn. Add the SHF_ALLOC flag.
(2) lld requires output section descriptions to be sorted
This patch series make seabios linkable with lld.
This is beneficial for FreeBSD ports as well
https://svnweb.freebsd.org/ports/head/misc/seabios/Makefile
as they can drop an LLD_UNSAFE
As a maintainer of lld ELF, I have triaged numerous pieces of software.
seabios is the only one making use of
Accepting ET_EXEC as an input file is an extremely rare GNU ld feature
that lld does not intend to support, because this is error-prone.
See Linux kernel commit 90ceddcb495008ac8ba7a3dce297841efcd7d584 for
another use of the dd trick.
--
Changes v1 -> v2
* Add status=none to the dd command line.
The previous commit changed romlayout32flag.lds to use `. += ` instead
of `. =`.
We no longer need the LD capability test checking
https://sourceware.org/bugzilla/show_bug.cgi?id=12726
Signed-off-by: Fangrui Song
---
scripts/test-build.sh | 42 +-
1 file c