Changeset 20287223 in mainline
- Timestamp:
- 2018-04-10T18:51:14Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ae84e38
- Parents:
- 57d44dd
- Location:
- uspace
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile.common
r57d44dd r20287223 303 303 ifneq ($(BINARY),) 304 304 $(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBTAGS) $(BASE_LIBS) 305 $(LD) $(LFLAGS) -T $(LINKER_SCRIPT) -Map $@.map -o $@ $(OBJECTS) $(LIBARGS) $(BASE_LIBS)305 $(LD) $(LFLAGS) $(EXTRA_LFLAGS) -T $(LINKER_SCRIPT) -Map $@.map -o $@ $(OBJECTS) $(LIBARGS) $(BASE_LIBS) 306 306 endif 307 307 308 308 ifneq ($(TEST_BINARY),) 309 309 $(TEST_BINARY): $(LINKER_SCRIPT) $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBTAGS) $(BASE_LIBS) 310 $(LD) $(LFLAGS) -T $(LINKER_SCRIPT) -Map $@.map -o $@ $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS)310 $(LD) $(LFLAGS) $(EXTRA_LFLAGS) -T $(LINKER_SCRIPT) -Map $@.map -o $@ $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS) 311 311 endif 312 312 … … 325 325 326 326 $(SLIBRARY): $(LIB_LINKER_SCRIPT) $(LIBRARY).la 327 $(LD) $(LIB_LFLAGS) -T $(LIB_LINKER_SCRIPT) -Map $@.map -o $@ --whole-archive $(LIBRARY).la --no-whole-archive327 $(LD) $(LIB_LFLAGS) $(EXTRA_LFLAGS) -T $(LIB_LINKER_SCRIPT) -Map $@.map -o $@ --whole-archive $(LIBRARY).la --no-whole-archive 328 328 329 329 $(LSONAME): -
uspace/lib/c/Makefile
r57d44dd r20287223 35 35 LINKER_SCRIPTS = \ 36 36 $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld \ 37 $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld \38 37 $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld \ 39 38 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld … … 204 203 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@ 205 204 206 $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in207 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@208 209 205 $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in 210 206 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@ -
uspace/lib/c/arch/abs32le/_link.ld.in
r57d44dd r20287223 3 3 4 4 PHDRS { 5 #ifdef LOADER6 interp PT_INTERP;7 #endif8 5 text PT_LOAD FILEHDR PHDRS FLAGS(5); 9 6 data PT_LOAD FLAGS(6); … … 12 9 13 10 SECTIONS { 14 #ifdef LOADER15 . = SEGMENT_START("text-segment", 0x70400000);16 #else17 11 . = SEGMENT_START("text-segment", 0x400000); 18 #endif19 12 #ifndef SHLIB 20 13 PROVIDE (__executable_start = .); … … 26 19 *(.rodata .rodata.*); 27 20 } :text 28 29 #ifdef LOADER30 .interp : {31 *(.interp);32 } :interp :text33 #endif34 21 35 22 . = . + 0x1000; -
uspace/lib/c/arch/amd64/_link.ld.in
r57d44dd r20287223 3 3 4 4 PHDRS { 5 #ifdef LOADER6 interp PT_INTERP;7 #endif8 5 text PT_LOAD FILEHDR PHDRS FLAGS(5); 9 6 data PT_LOAD FLAGS(6); … … 13 10 14 11 SECTIONS { 15 #ifdef LOADER16 . = SEGMENT_START("text-segment", 0x70400000);17 #else18 12 . = SEGMENT_START("text-segment", 0x400000); 19 #endif20 13 #ifndef SHLIB 21 14 PROVIDE (__executable_start = .); … … 31 24 *(.rodata .rodata.*); 32 25 } :text 33 34 #ifdef LOADER35 .interp : {36 *(.interp);37 } :interp :text38 #endif39 26 40 27 . = . + 0x1000; -
uspace/lib/c/arch/arm32/_link.ld.in
r57d44dd r20287223 3 3 4 4 PHDRS { 5 #ifdef LOADER6 interp PT_INTERP;7 #endif8 5 text PT_LOAD FILEHDR PHDRS FLAGS(5); 9 6 data PT_LOAD FLAGS(6); … … 12 9 13 10 SECTIONS { 14 #ifdef LOADER15 . = SEGMENT_START("text-segment", 0x70400000);16 #else17 11 . = SEGMENT_START("text-segment", 0x400000); 18 #endif19 12 #ifndef SHLIB 20 13 PROVIDE (__executable_start = .); … … 30 23 *(.rodata .rodata.*); 31 24 } :text 32 33 #ifdef LOADER34 .interp : {35 *(.interp);36 } :interp :text37 #endif38 25 39 26 . = . + 0x1000; -
uspace/lib/c/arch/ia32/_link.ld.in
r57d44dd r20287223 5 5 6 6 PHDRS { 7 #if defined( LOADER) || defined(DLEXE)7 #if defined(DLEXE) 8 8 interp PT_INTERP; 9 9 #endif … … 18 18 19 19 SECTIONS { 20 #ifdef LOADER21 . = SEGMENT_START("text-segment", 0x70400000);22 #else23 20 . = SEGMENT_START("text-segment", 0x400000); 24 #endif25 21 #ifndef SHLIB 26 22 PROVIDE (__executable_start = .); … … 66 62 #endif 67 63 68 #if defined( LOADER) || defined(DLEXE)64 #if defined(DLEXE) 69 65 .interp : { 70 66 *(.interp); -
uspace/lib/c/arch/ia64/_link.ld.in
r57d44dd r20287223 3 3 4 4 PHDRS { 5 #ifdef LOADER6 interp PT_INTERP;7 #endif8 5 text PT_LOAD FILEHDR PHDRS FLAGS(5); 9 6 data PT_LOAD FLAGS(6); … … 12 9 13 10 SECTIONS { 14 #ifdef LOADER15 . = SEGMENT_START("text-segment", 0x8000000000);16 #else17 11 . = SEGMENT_START("text-segment", 0x400000); 18 #endif19 12 #ifndef SHLIB 20 13 PROVIDE (__executable_start = .); … … 33 26 *(.rodata .rodata.*); 34 27 } :text 35 36 #ifdef LOADER37 .interp : {38 *(.interp);39 } :interp :text40 #endif41 28 42 29 . = . + 0x4000; -
uspace/lib/c/arch/mips32/_link.ld.in
r57d44dd r20287223 3 3 4 4 PHDRS { 5 #ifdef LOADER6 interp PT_INTERP;7 #endif8 5 text PT_LOAD FILEHDR PHDRS FLAGS(5); 9 6 data PT_LOAD FLAGS(6); … … 12 9 13 10 SECTIONS { 14 #ifdef LOADER15 . = SEGMENT_START("text-segment", 0x70400000);16 #else17 11 . = SEGMENT_START("text-segment", 0x400000); 18 #endif19 12 #ifndef SHLIB 20 13 PROVIDE (__executable_start = .); … … 30 23 *(.rodata .rodata.*); 31 24 } :text 32 33 #ifdef LOADER34 .interp : {35 *(.interp);36 } :interp :text37 #endif38 25 39 26 . = . + 0x4000; -
uspace/lib/c/arch/ppc32/_link.ld.in
r57d44dd r20287223 3 3 4 4 PHDRS { 5 #ifdef LOADER6 interp PT_INTERP;7 #endif8 5 text PT_LOAD FILEHDR PHDRS FLAGS(5); 9 6 data PT_LOAD FLAGS(6); … … 13 10 14 11 SECTIONS { 15 #ifdef LOADER16 . = SEGMENT_START("text-segment", 0x70400000);17 #else18 12 . = SEGMENT_START("text-segment", 0x400000); 19 #endif20 13 #ifndef SHLIB 21 14 PROVIDE (__executable_start = .); … … 31 24 *(.rodata .rodata.*); 32 25 } :text 33 34 #ifdef LOADER35 .interp : {36 *(.interp);37 } :interp :text38 #endif39 26 40 27 . = . + 0x1000; -
uspace/lib/c/arch/riscv64/_link.ld.in
r57d44dd r20287223 3 3 4 4 PHDRS { 5 #ifdef LOADER6 interp PT_INTERP;7 #endif8 5 text PT_LOAD FILEHDR PHDRS FLAGS(5); 9 6 data PT_LOAD FLAGS(6); … … 13 10 14 11 SECTIONS { 15 #ifdef LOADER16 . = SEGMENT_START("text-segment", 0x70400000);17 #else18 12 . = SEGMENT_START("text-segment", 0x400000); 19 #endif20 13 #ifndef SHLIB 21 14 PROVIDE (__executable_start = .); … … 28 21 *(.srodata .srodata.*); 29 22 } :text 30 31 #ifdef LOADER32 .interp : {33 *(.interp);34 } :interp :text35 #endif36 23 37 24 . = . + 0x1000; -
uspace/lib/c/arch/sparc64/_link.ld.in
r57d44dd r20287223 3 3 4 4 PHDRS { 5 #ifdef LOADER6 interp PT_INTERP;7 #endif8 5 text PT_LOAD FILEHDR PHDRS FLAGS(5); 9 6 data PT_LOAD FLAGS(6); … … 13 10 14 11 SECTIONS { 15 #ifdef LOADER16 . = SEGMENT_START("text-segment", 0x70400000);17 #else18 12 . = SEGMENT_START("text-segment", 0x400000); 19 #endif20 13 #ifndef SHLIB 21 14 PROVIDE (__executable_start = .); … … 31 24 *(.rodata .rodata.*); 32 25 } :text 33 34 #ifdef LOADER35 .interp : {36 *(.interp);37 } :interp :text38 #endif39 26 40 27 . = . + 0x4000; -
uspace/srv/loader/Makefile
r57d44dd r20287223 30 30 USPACE_PREFIX = ../.. 31 31 32 LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld 32 EXTRA_LFLAGS = -Ttext-segment=0x70000000 33 33 34 34 BINARY = loader
Note:
See TracChangeset
for help on using the changeset viewer.