bios: Fix PHDR link error
binutils 2.34 contains stricter checks for sections that are not included in the linker script, resulting in this error: ld: bios.elf: error: PHDR segment not covered by LOAD segment From the 2.34 NEWS: The ld check for "PHDR segment not covered by LOAD segment" is more effective, catching cases that were wrongly allowed by previous versions of ld. If you see this error it is likely you are linking with a bad linker script or the binary you are building is not intended to be loaded by a dynamic loader. In the latter case --no-dynamic-linker is appropriate. As the BIOS runs bare metal, we do not need to emit a PHDR segment. Signed-off-by: Joel Stanley <joel@jms.id.au>
This commit is contained in:
parent
1d27e25cbb
commit
c74e3642b3
|
@ -53,7 +53,7 @@ INCLUDES = -I$(SOC_DIRECTORY)/software/include/base \
|
||||||
COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc -fno-stack-protector $(INCLUDES)
|
COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc -fno-stack-protector $(INCLUDES)
|
||||||
CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
|
CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
|
||||||
CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding
|
CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding
|
||||||
LDFLAGS = -nostdlib -nodefaultlibs -L$(BUILDINC_DIRECTORY)
|
LDFLAGS = -nostdlib -nodefaultlibs -Wl,--no-dynamic-linker -L$(BUILDINC_DIRECTORY)
|
||||||
|
|
||||||
define compilexx
|
define compilexx
|
||||||
$(CX) -c $(CXXFLAGS) $(1) $< -o $@
|
$(CX) -c $(CXXFLAGS) $(1) $< -o $@
|
||||||
|
|
Loading…
Reference in New Issue