diff options
author | Iru Cai <mytbk920423@gmail.com> | 2021-07-21 23:14:35 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-07-22 13:39:08 +0000 |
commit | b90aba43c1405d3d2cb7cba05e68906e979dcda3 (patch) | |
tree | ca171b20a8c1b6fce2bf3cf887a29fc828444806 /src/arch/riscv/trap_handler.c | |
parent | ab1d1a02790f69e506ce1dfad7b4c1c54caa822d (diff) | |
download | coreboot-b90aba43c1405d3d2cb7cba05e68906e979dcda3.tar.gz coreboot-b90aba43c1405d3d2cb7cba05e68906e979dcda3.tar.bz2 coreboot-b90aba43c1405d3d2cb7cba05e68906e979dcda3.zip |
Makefile.inc: Replace linker flag -nostartfiles with --nmagic
While the gcc(1) driver has the `-nostartfiles` option, ld(1), the
program the coreboot toolchain uses to link the object files, doesn't
have it.
In binutils before 2.36, this option is interpreted as `-n -o
startfiles`, in which the `-o` option is overridden by a later `-o`
option, so only the `-n` option has effect, which is the `--nmagic`
long option of ld(1). So the correct linker option in this place is
`--nmagic`.
It is tested that without `--nmagic`, ld can generate a much bigger
x86_64 romstage, so this option is still needed.
This error is found when trying to update binutils to 2.36 and later
versions, where ld(1) is unable to disambiguate options and reports an
error.
Change-Id: I27dc2209abdc6fec866716a252736c5cf236a347
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56490
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/arch/riscv/trap_handler.c')
0 files changed, 0 insertions, 0 deletions