forked from Imagelibrary/rtems
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:
@@ -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>
|
2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* configure.ac: Remove AC_CONFIG_AUX_DIR.
|
* configure.ac: Remove AC_CONFIG_AUX_DIR.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
%{!qnolinkcmds: -T linkcmds%s}}}
|
%{!qnolinkcmds: -T linkcmds%s}}}
|
||||||
|
|
||||||
*startfile:
|
*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.o%s} \
|
||||||
%{qrtems_debug: start_g.o%s}}}
|
%{qrtems_debug: start_g.o%s}}}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
VPATH = @srcdir@:@srcdir@/../../shared/start
|
VPATH = @srcdir@:@srcdir@/../../shared/start
|
||||||
|
|
||||||
S_FILES = start.S
|
S_FILES = start.S rtems_crti.S
|
||||||
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
|
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
|
||||||
|
|
||||||
OBJS = $(S_O_FILES)
|
OBJS = $(S_O_FILES)
|
||||||
@@ -15,18 +15,22 @@ include $(top_srcdir)/../../../../../../automake/lib.am
|
|||||||
#
|
#
|
||||||
# (OPTIONAL) Add local stuff here using +=
|
# (OPTIONAL) Add local stuff here using +=
|
||||||
#
|
#
|
||||||
|
bsplib_DATA = $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).$(OBJEXT)
|
||||||
install-data-local: $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).$(OBJEXT)
|
bsplib_DATA += $(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT)
|
||||||
@$(mkinstalldirs) $(DESTDIR)$(bsplibdir)
|
|
||||||
$(INSTALL_DATA) $< $(DESTDIR)$(bsplibdir)
|
|
||||||
|
|
||||||
$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).$(OBJEXT): $(ARCH)/start.$(OBJEXT)
|
$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).$(OBJEXT): $(ARCH)/start.$(OBJEXT)
|
||||||
$(INSTALL_DATA) $< $@
|
$(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/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
|
include $(top_srcdir)/../../../../../../automake/local.am
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ SECTIONS
|
|||||||
.rela.sdata2 : { *(.rela.sdata2) } > CODE
|
.rela.sdata2 : { *(.rela.sdata2) } > CODE
|
||||||
.rela.sbss2 : { *(.rela.sbss2) } > CODE
|
.rela.sbss2 : { *(.rela.sbss2) } > CODE
|
||||||
|
|
||||||
.init : { _init = .; KEEP(*(.init)) } > CODE
|
.init : { KEEP(*(.init)) } > CODE
|
||||||
|
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
@@ -97,6 +97,7 @@ SECTIONS
|
|||||||
.fini_array : { *(.fini_array) } >CODE
|
.fini_array : { *(.fini_array) } >CODE
|
||||||
PROVIDE (__fini_array_end = .);
|
PROVIDE (__fini_array_end = .);
|
||||||
|
|
||||||
|
_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
|
||||||
.sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } >CODE
|
.sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } >CODE
|
||||||
.sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >CODE
|
.sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >CODE
|
||||||
.eh_frame : { *.(eh_frame) } >CODE
|
.eh_frame : { *.(eh_frame) } >CODE
|
||||||
@@ -191,6 +192,7 @@ SECTIONS
|
|||||||
/* We want the small data sections together, so single-instruction offsets
|
/* We want the small data sections together, so single-instruction offsets
|
||||||
can access them all, and initialized data all before uninitialized, so
|
can access them all, and initialized data all before uninitialized, so
|
||||||
we can shorten the on-disk segment size. */
|
we can shorten the on-disk segment size. */
|
||||||
|
_SDA_BASE_ = __SDATA_START__ + 0x8000;
|
||||||
.sdata : { *(.sdata) *(.gnu.linkonce.s.*) } >CODE
|
.sdata : { *(.sdata) *(.gnu.linkonce.s.*) } >CODE
|
||||||
_edata = .;
|
_edata = .;
|
||||||
PROVIDE (edata = .);
|
PROVIDE (edata = .);
|
||||||
|
|||||||
Reference in New Issue
Block a user