mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
ld: load dynamic linker at static address on Linux
* move stack area to static address at beginning of binary * set ELF type of linker from shared to executable fixes #3479
This commit is contained in:
committed by
Christian Helmuth
parent
468270f6e9
commit
2fc6cedcc0
@@ -30,13 +30,22 @@ symbol.map: $(BASE_DIR)/lib/symbols/ld
|
||||
ifneq ($(filter linux, $(SPECS)),)
|
||||
|
||||
ENTRY_POINT = _start_initial_stack
|
||||
LD_SCRIPT_SO = $(BASE_DIR)/src/ld/genode_rel.ld \
|
||||
-T$(call select_from_repositories,src/ld/stack_area.ld) \
|
||||
LD_SCRIPT_SO = $(call select_from_repositories,src/ld/stack_area.ld) \
|
||||
-T$(BASE_DIR)/src/ld/genode_rel.ld
|
||||
|
||||
ifneq ($(filter x86_32, $(SPECS)),)
|
||||
LD_OPT += -T$(DIR)/linux-32.ld
|
||||
endif
|
||||
|
||||
#
|
||||
# set dynamic linker ELF type to executable
|
||||
#
|
||||
ifeq ($(called_from_lib_mk),yes)
|
||||
$(LIB).lib.so.stripped: postprocess.tag
|
||||
postprocess.tag: $(LIB).lib.so
|
||||
$(VERBOSE)printf "\x02" | dd of=$(LIB).lib.so bs=1 seek=16 count=1 conv=notrunc
|
||||
endif
|
||||
|
||||
else
|
||||
ENTRY_POINT = _start
|
||||
LD_OPT += -T$(DIR)/linker.ld
|
||||
|
||||
Reference in New Issue
Block a user