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
objdump when dumping ELF section/symbol
information.
Signed-off-by: Fangrui Song
---
Changes from v2
(https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/message/4AZCP2KR63YAURID5FFXOWMPIOB4BNRJ/)
* Change an objdump comment to mention readelf
* For your convenience, this patch is available
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
as well
because we can delete an ld check detecting "cannot move location
counter backwards".
Signed-off-by: Fangrui Song
---
scripts/layoutrom.py | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py
index fa270ef..7bc4
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.p
relocation.
GNU ld allows it but lld will warn. Add the SHF_ALLOC flag.
Signed-off-by: Fangrui Song
---
src/romlayout.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/romlayout.S b/src/romlayout.S
index c4a4635..a854783 100644
--- a/src/romlayout.S
+++ b/src/romlayout.S
record on
(previously not) https://mail.coreboot.org/postorius/lists/seabios.seabios.org/
as well as https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/
Fangrui Song (4):
romlayout.S: Add missing SHF_ALLOC flag to .fixedaddr.\addr
Make rom16.o linkable with lld
romlayout32flag.lds: Use `. +
On 2020-07-10, Nick Clifton via Binutils wrote:
Hi Guys,
I have just updated PR 26047 with a suggested patch which I think could resolve
this situation. (Patch attached here as well in order to save time). It adds
a new linker command line option: -z allowexec which will disable the warn
On 2020-07-10, Kevin O'Connor wrote:
On Fri, Jul 10, 2020 at 11:58:06AM +0100, Nick Clifton wrote:
Hi Guys,
I have just updated PR 26047 with a suggested patch which I think could
resolve
this situation. (Patch attached here as well in order to save time). It adds
a new linker command
On 2020-04-21, Fāng-ruì Sòng wrote:
On 2020-04-21, Gerd Hoffmann wrote:
Hi,
Hi Gerd, thank you for your comments.
You mean "Makefile: Change ET_EXEC to ET_REL so that lld can link
bios.bin.elf"
Let me add more descriptions. I am a maintainer of lld ELF (I
contributed most features and wrote
relocation.
GNU ld allows it but lld will warn. Add the SHF_ALLOC flag.
Signed-off-by: Fangrui Song
---
vgasrc/vgaentry.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vgasrc/vgaentry.S b/vgasrc/vgaentry.S
index f9624fc..93f28f9 100644
--- a/vgasrc/vgaentry.S
+++ b/vgasrc
On 2020-04-06, Kevin O'Connor wrote:
On Wed, Apr 01, 2020 at 10:29:14AM -0700, Fangrui Song wrote:
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
as well
because we can delete an ld check detecting "cannot move location
counter backwards".
--
Changes v2 -> v3
* Add `first` to avoid overloading `location`
* Delete startsym from the parameters
Signed-off-by: Fangrui Song
---
scripts/layoutrom.py | 12 +---
1 fi
relocation.
GNU ld allows it but lld will warn. Add the SHF_ALLOC flag.
Signed-off-by: Fangrui Song
---
src/romlayout.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/romlayout.S b/src/romlayout.S
index c4a4635..a854783 100644
--- a/src/romlayout.S
+++ b/src/romlayout.S
ine. This suppresses dd's stderr output.
* Move dd command to a separate command
Signed-off-by: Fangrui Song
---
Makefile | 4
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index 5f7d537..118dec0 100644
--- a/Makefile
+++ b/Makefile
@@ -177,10 +177,14
This drops the only instance
https://sourceware.org/bugzilla/show_bug.cgi?id=12726
1, 2, 3 and 4 are really independent and can be applied in arbitrary order.
5 depends on 4. I originally combined 4 and 5 and that was why I don't think a
patch series made sense.
Fangrui Song (5):
romlay
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.p
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
On 2020-04-06, Kevin O'Connor wrote:
On Wed, Apr 01, 2020 at 10:29:12AM -0700, Fangrui Song wrote:
(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 allo
On 2020-04-06, Kevin O'Connor wrote:
On Wed, Apr 01, 2020 at 10:29:15AM -0700, Fangrui Song wrote:
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
T
On 2020-04-06, Kevin O'Connor wrote:
On Wed, Apr 01, 2020 at 10:29:13AM -0700, Fangrui Song wrote:
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 c
On 2020-04-06, Kevin O'Connor wrote:
On Wed, Apr 01, 2020 at 06:12:09PM -0700, Fangrui Song wrote:
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 re
: Fangrui Song
---
Makefile | 18 +++---
scripts/checkrom.py | 2 +-
scripts/layoutrom.py | 143 ---
3 files changed, 78 insertions(+), 85 deletions(-)
--
Changes v1->v2
* Deleted unrelated debug lines
diff --git a/Makefile b/Makefile
in
as well
because we can delete an ld check detecting "cannot move location
counter backwards".
Signed-off-by: Fangrui Song
---
scripts/layoutrom.py | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py
index 4c55390..94d4
by address.
Just sort the addresses beforehand.
Signed-off-by: Fangrui Song
---
scripts/layoutrom.py | 4
src/romlayout.S | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py
index 6616721..4c55390 100755
--- a/scripts
This drops the only instance
https://sourceware.org/bugzilla/show_bug.cgi?id=12726
1, 2 and 3 are really independent and can be applied in arbitrary order.
4 depends on 3. I originally combined 3 and 4 and that was why I don't think a
patch series made sense.
Fangrui Song (4):
Make ro
ine. This suppresses dd's stderr output.
* Move dd command to a separate command
Signed-off-by: Fangrui Song
---
Makefile | 4
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index 5f7d537..118dec0 100644
--- a/Makefile
+++ b/Makefile
@@ -177,10 +177,14
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
On 2020-03-19, Christian Ehrhardt wrote:
Some hardened gcc v9 compilers (such as the one in Ubuntu)
default this option which for seabios leads to emulation errors
when running in KVM (does not trigger in TCG) on older intel
chips of the Penryn generation (~2006-2008).
Symptom in KVM looks like:
On 2020-03-17, Kevin O'Connor wrote:
On Fri, Mar 13, 2020 at 10:17:09PM -0700, Fangrui Song wrote:
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 i
(This does no harm because we use LD directly.)
-nopie is a typo. The actual option is -no-pie. CFLAGS does not need to
include a link option.
Signed-off-by: Fangrui Song
---
Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 8d087af..1400bf2 100644
--- a
work.)
bios.bin.elf uses an extremely rare feature of GNU ld: an ET_EXEC can be
linked as if it were an ET_REL. lld is rigid and will reject this use case.
With this patch, I can link bios.bin.elf with lld 7.
Signed-off-by: Fangrui Song
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
// a.c
#include
int main() { puts("hello"); }
gcc -O2 -fdata-sections -c a.c && readelf -WS a.o | grep .rodata
[ 4] .rodata.str1.1PROGBITS 40 06 01 AMS
0 0 1
gcc -O2 -fdata-sections -fno-merge-constants -c a.c && readelf -WS a.o | grep
.rodata
[ 4]
Sorry, v1 does not work with GCC.
gcc x86_64 rejects -mpreferred-stack-boundary=2, so we need to check
-mpreferred-stack-boundary=4 instead
Signed-off-by: Fangrui Song
---
Makefile | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 7720db9
(
depends on
https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/SWDV7MB6KSP2ZJF3SEVB3W3H3SOJMXEB/
"[PATCH] Makefile: Refactor cc-option"
see linux/arch/x86/Makefile for a similar use case
)
Signed-off-by: Fangrui Song
---
Makefile | 3 ++-
1 file changed, 2
(This will be used by my next patch which will fix clang warning/error
for -fno-merge-constants -mpreferred-stack-boundary=2)
Suppress stderr output and add -Werror.
clang emits [-Wignored-optimization-argument] for certain ignored GCC options.
Signed-off-by: Fangrui Song
---
Makefile | 26
ogram headers or non-SHF_ALLOC
sections, so the PHDRS command and strip -R .comment are redundant.
Signed-off-by: Fangrui Song
---
Makefile | 10 +++---
scripts/layoutrom.py | 6 +-
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index 7a
rom.o
Signed-off-by: Fangrui Song
---
Makefile | 10 +++---
scripts/layoutrom.py | 7 ++-
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index 7a16195..e52b395 100644
--- a/Makefile
+++ b/Makefile
@@ -182,13 +182,13 @@ $(OUT)rom32seg.o:
difficult to
emulate in llvm-objdump.
Signed-off-by: Fangrui Song
---
Makefile | 18 +++---
scripts/checkrom.py | 2 +-
scripts/layoutrom.py | 146 +--
3 files changed, 80 insertions(+), 86 deletions(-)
diff --git a/Makefile b/Makefile
by address.
Signed-off-by: Fangrui Song
(Note: with
https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/CJR7WU6TTHVQEG5XHCRI75EA6SBV72SW/
and this patch, qemu-system-x86_64 -boot menu=on,splash-time=15000 -bios
out/bios.bin -nographic
seems to work for me with a small change
See
https://bugs.llvm.org/show_bug.cgi?id=43083
Signed-off-by: Fangrui Song
---
scripts/layoutrom.py | 7 ++-
scripts/test-build.sh | 42 +-
2 files changed, 7 insertions(+), 42 deletions(-)
diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py
index 661672
41 matches
Mail list logo