diff options
author | Rob Savoye <rob@cygnus> | 1996-05-09 15:56:58 +0000 |
---|---|---|
committer | Rob Savoye <rob@cygnus> | 1996-05-09 15:56:58 +0000 |
commit | 01d8a35928602b9262b571e82bc5c2a8d2fbcbb3 (patch) | |
tree | f38d749c0c5477de315ad8665b54b3baeede628f /ld/scripttempl | |
parent | 2ae2f078835bb49e058ec436645ffe03381cb788 (diff) | |
download | gdb-01d8a35928602b9262b571e82bc5c2a8d2fbcbb3.zip gdb-01d8a35928602b9262b571e82bc5c2a8d2fbcbb3.tar.gz gdb-01d8a35928602b9262b571e82bc5c2a8d2fbcbb3.tar.bz2 |
* emulparams/{elf32bmip.sh,elf32lmip.sh,mipsidt.sh,mipsidtl.sh}:
Set a new variable to signify if the final target is an embedded
system.
* scripttempl/{mips.sc,elfmips.sc}: Don't add SIZEOF_HEADERS to
.text for an embedded system.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elfmips.sc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ld/scripttempl/elfmips.sc b/ld/scripttempl/elfmips.sc index b5ca98d..cb5c543 100644 --- a/ld/scripttempl/elfmips.sc +++ b/ld/scripttempl/elfmips.sc @@ -15,6 +15,7 @@ # .data section. # OTHER_BSS_SYMBOLS - symbols that appear at the start of the # .bss section besides __bss_start. +# EMBEDDED - whether this is for an embedded system. # # When adding sections, do note that the names of some sections are used # when specifying the start address of the next. @@ -30,6 +31,13 @@ if [ -z "$ENTRY" ]; then esac fi +# if this is for an embedded system, don't add SIZEOF_HEADERS. +if [ -z "$EMBEDDED" ]; then + test -z ${TEXT_BASE_ADDRESS} && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS" +else + test -z ${TEXT_BASE_ADDRESS} && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}" +fi + test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} test "$LD_FLAG" = "N" && DATA_ADDR=. @@ -51,7 +59,7 @@ ${RELOCATING- /* For some reason, the Solaris linker makes bad executables SECTIONS { /* Read-only sections, merged into text segment: */ - ${CREATE_SHLIB-${RELOCATING+. = ${TEXT_START_ADDR} + SIZEOF_HEADERS;}} + ${CREATE_SHLIB-${RELOCATING+. = ${TEXT_BASE_ADDRESS};}} ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR} + SIZEOF_HEADERS;}} ${CREATE_SHLIB-${INTERP}} .reginfo ${RELOCATING-0} : { *(.reginfo) } |