This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Updated RDOS support
- From: Alan Modra <amodra at gmail dot com>
- To: Leif Ekblad <leif at rdos dot net>
- Cc: binutils at sourceware dot org
- Date: Tue, 8 Jan 2013 19:54:10 +1030
- Subject: Re: [PATCH] Updated RDOS support
- References: <6CBB64D851824F13BE60F6BF094AEDD0@AMDP6>
On Fri, Jan 04, 2013 at 11:03:51PM +0100, Leif Ekblad wrote:
> Change log:
> * bfd/config.bfd: Removed unsupported models for rdos.
> * ld/configure.tgt: Changed rdos target emulation to use a new file
> * ld/emulparams/elf64rdos.sh: New emulation file for target rdos.
> * ld/Makefile.am: Added target emulation file to makefile.
> * ld/scripttempl/elf.sc: Fixed error in RODATA_ADDR script. Added
> support for putting large data in separate segment at a fixed
> address.
> * ld/Makefile.in: Regenerated with autoconf from ld/Makefile.am
> *** 2084,2089 ****
> --- 2085,2093 ----
> $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \
> $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
> ${GENSCRIPTS} elf64ppc_fbsd "$(tdir_elf64ppc_fbsd)"
> + eelf64rdos.c: $(srcdir)/emulparams/elf64rdos.sh \
> + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
> + ${GENSCRIPTS} elf64tilegx "$(tdir_elf64rdos)"
elf64tilegx?
> +
> + EOF
> +
> + if test -n "${LARGE_DATA_ADDR}"; then
> + LARGE_DATA_ADDR=". = \
> + SEGMENT_START(\"ldata-segment\", ${LARGE_DATA_ADDR}) + SIZEOF_HEADERS;"
> + fi
> + if test -n "${SHLIB_LARGE_DATA_ADDR}"; then
> + SHLIB_LARGE_DATA_ADDR=". = \
> + SEGMENT_START(\"ldata-segment\", ${SHLIB_LARGE_DATA_ADDR}) + SIZEOF_HEADERS;"
> + fi
> + cat <<EOF
> + ${RELOCATING+${CREATE_SHLIB-${CREATE_PIE-${LARGE_DATA_ADDR}}}}
> + ${RELOCATING+${CREATE_SHLIB+${SHLIB_LARGE_DATA_ADDR}}}
> + ${RELOCATING+${CREATE_PIE+${SHLIB_LARGE_DATA_ADDR}}}
> +
> ${OTHER_BSS_SECTIONS}
> ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
> ${RELOCATING+. = ALIGN(${ALIGNMENT});}
Why should $LARGE_DATA_ADDR affect $OTHER_BSS_SECTIONS? Hmm, I see
LARGE_SECTIONS=yes adds .lbss to OTHER_BSS_SECTIONS. That's not very
nice as quite a few targets use OTHER_BSS_SECTIONS for other purposes.
Your patch makes this even more confusing. Also, since you seem to
want a separate large segment, do you really want to lay out your
large sections as .lbss, .lrodata, .ldata? Wouldn't .lrodata, .ldata,
.lbss make more sense?
Also, there isn't much point in adding support for -Tldata-segment
here without the rest of the support, so that needs adding or simply
omit use of SEGMENT_START().
I committed your fix for RODATA_ADDR. Thanks!
--
Alan Modra
Australia Development Lab, IBM