diff --git a/ld/ChangeLog b/ld/ChangeLog index b601fd62b3..e8dd49583e 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +Mon May 12 11:11:06 1997 Andreas Schwab + + * scripttempl/elf.sc: Don't align the data segment on the next 8 + byte boundary, instead let the linker use whatever the individual + sections require. + Fri May 9 17:45:46 1997 Ian Lance Taylor * configure.tgt (i[3456]86-*-gnu*): Don't include Mach support. diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 665af8e1ca..27f2e9d53f 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -16,6 +16,7 @@ # OTHER_BSS_SYMBOLS - symbols that appear at the start of the # .bss section besides __bss_start. # DATA_PLT - .plt should be in data segment, not text segment. +# 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. @@ -27,6 +28,14 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI test "$LD_FLAG" = "N" && DATA_ADDR=. INTERP=".interp ${RELOCATING-0} : { *(.interp) }" PLT=".plt ${RELOCATING-0} : { *(.plt) }" + +# 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 + cat <