2003-03-18 Till Straumann <strauman@slac.stanford.edu>

PR 356/bsps
	* bsp_specs, start/Makefile.am, startup/linkcmds
	This patch makes RTEMS/powerpc/shared EABI compliant.
	Declare all linker-script defined addresses as
	variables of unknown size and not as short objects
	like 'int', 'void*' etc.
	This prevents the compiler from generating a relocation
	who assumes the existence of an __rtems_end object in
	one of the short data areas (which would result in a
	linker error).
This commit is contained in:
Joel Sherrill
2003-03-18 18:16:53 +00:00
parent 95501284c6
commit 98847ed837
4 changed files with 28 additions and 9 deletions

View File

@@ -1,3 +1,16 @@
2003-03-18 Till Straumann <strauman@slac.stanford.edu>
PR 356/bsps
* bsp_specs, start/Makefile.am, startup/linkcmds
This patch makes RTEMS/powerpc/shared EABI compliant.
Declare all linker-script defined addresses as
variables of unknown size and not as short objects
like 'int', 'void*' etc.
This prevents the compiler from generating a relocation
who assumes the existence of an __rtems_end object in
one of the short data areas (which would result in a
linker error).
2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Remove AC_CONFIG_AUX_DIR.

View File

@@ -14,7 +14,7 @@
%{!qnolinkcmds: -T linkcmds%s}}}
*startfile:
%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s crtbegin.o%s \
%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s \
%{!qrtems_debug: start.o%s} \
%{qrtems_debug: start_g.o%s}}}

View File

@@ -4,7 +4,7 @@
VPATH = @srcdir@:@srcdir@/../../shared/start
S_FILES = start.S
S_FILES = start.S rtems_crti.S
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
OBJS = $(S_O_FILES)
@@ -15,18 +15,22 @@ include $(top_srcdir)/../../../../../../automake/lib.am
#
# (OPTIONAL) Add local stuff here using +=
#
install-data-local: $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).$(OBJEXT)
@$(mkinstalldirs) $(DESTDIR)$(bsplibdir)
$(INSTALL_DATA) $< $(DESTDIR)$(bsplibdir)
bsplib_DATA = $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).$(OBJEXT)
bsplib_DATA += $(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT)
$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).$(OBJEXT): $(ARCH)/start.$(OBJEXT)
$(INSTALL_DATA) $< $@
$(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT): $(ARCH)/rtems_crti.$(OBJEXT)
$(INSTALL_DATA) $< $@
TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).$(OBJEXT)
TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT)
all-local: $(ARCH) $(OBJS) $(ARCH)/start.$(OBJEXT) $(TMPINSTALL_FILES)
all-local: $(ARCH) $(OBJS) $(ARCH)/start.$(OBJEXT) $(ARCH)/rtems_crti.$(OBJEXT) $(TMPINSTALL_FILES)
.PRECIOUS: $(ARCH)/start.$(OBJEXT)
$(OBJS): $(ARCH)
.PRECIOUS: $(ARCH)/start.$(OBJEXT) $(ARCH)/rtems_crti.$(OBJEXT)
include $(top_srcdir)/../../../../../../automake/local.am

View File

@@ -53,7 +53,7 @@ SECTIONS
.rela.sdata2 : { *(.rela.sdata2) } > CODE
.rela.sbss2 : { *(.rela.sbss2) } > CODE
.init : { _init = .; KEEP(*(.init)) } > CODE
.init : { KEEP(*(.init)) } > CODE
.text :
{
@@ -97,6 +97,7 @@ SECTIONS
.fini_array : { *(.fini_array) } >CODE
PROVIDE (__fini_array_end = .);
_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
.sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } >CODE
.sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >CODE
.eh_frame : { *.(eh_frame) } >CODE
@@ -191,6 +192,7 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
_SDA_BASE_ = __SDATA_START__ + 0x8000;
.sdata : { *(.sdata) *(.gnu.linkonce.s.*) } >CODE
_edata = .;
PROVIDE (edata = .);