[SeaBIOS] [PATCH] Make rom16.o linkable with lld

2020-03-13 Thread Fangrui Song
(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

[SeaBIOS] [PATCH] romlayout32flag.lds: Use `. +=` instead of `. =`

2020-03-13 Thread Fangrui Song
This improves the portability of the linker script and allows lld to link rom.o We can thus delete an ld check detecting "cannot move location counter backwards". Dot assignment inside an output section has a inconsistent behavior which makes lld difficult to implement. See https://bugs.llvm.org