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
lld requires output section descriptions to be sorted by address.
Just sort the addresses beforehand.
--
Changes v2 -> v3
* Sort sections by finalloc unconditionally
Signed-off-by: Fangrui Song
---
scripts/layoutrom.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/layoutrom.py
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
It does not make sense to reference a SHF_ALLOC section from a
non-SHF_ALLOC section via R_386_PC16. Conceptually, even if a
non-SHF_ALLOC is loaded as part of the memory image, the distance
between it and a SHF_ALLOC section may not be a constant, so the linker
cannot reasonably resolve the
Another try after
https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/KBHQU4OLW2THG5Q5F5X7EWTQDJHKNVYC/
The only change is the removal of `Makefile: Change ET_EXEC to ET_REL so that
lld can link bios.bin.elf`
since 699a4e5d6919cc8eae5342443025ceb6909dc276
("ldnoexec: Add script
objdump -h relies heavily on BFD internals and the BFD flags. The output
is difficult to emulate in llvm-objdump. (llvm-objdump -h has a
different output https://reviews.llvm.org/D57146). Switch to READELF, so
that llvm-readelf can be used as an alternative.
readelf is generally better than
On Wed, Jul 13, 2022 at 10:01 PM Paul Menzel wrote:
>
> Dear Fangrui,
>
>
> Thank you for the patch.
>
> Am 13.07.22 um 04:37 schrieb Fangrui Song via SeaBIOS:
> > objdump -h relies heavily on BFD internals and the BFD flags. The output
> > is difficult to emula