mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-16 06:08:16 +00:00
Hardening compilation support for 64bit Linux
Without this patch the compilation failed with: /usr/bin/ld: main.o: relocation R_X86_64_32S against `vtable for Genode::Dataspace' can not be used when making a shared object; recompile with -fPIC main.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[6]: *** [init] Error 1 For this patch the use of the hardening tool chain must be indicated using the "hardening_tool_chain" SPECS entry within the file <build>/etc/specs.conf Fixes #79
This commit is contained in:
committed by
Norman Feske
parent
df6a2f1365
commit
ae41acec27
@ -77,10 +77,17 @@ endif
|
||||
#
|
||||
# Use the host's startup codes, linker script, and dynamic linker
|
||||
#
|
||||
ifneq ($(filter hardening_tool_chain, $(SPECS)),)
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=Scrt1.o)
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crti.o)
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtbeginS.o)
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtendS.o)
|
||||
else
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crt1.o)
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crti.o)
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtbegin.o)
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtend.o)
|
||||
endif
|
||||
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtn.o)
|
||||
EXT_OBJECTS += -lgcc -lgcc_s -lsupc++ -lc
|
||||
EXT_OBJECTS += -lpthread
|
||||
|
Reference in New Issue
Block a user