[rtems commit] Revert "bsps/arm: Use ALIGN_WITH_INPUT"

Chris Johns chrisj at rtems.org
Thu Dec 19 00:28:46 UTC 2013


Module:    rtems
Branch:    master
Commit:    1ab4f76900d012b5a9dbce2851add060f11ce13a
Changeset: http://git.rtems.org/rtems/commit/?id=1ab4f76900d012b5a9dbce2851add060f11ce13a

Author:    Chris Johns <chrisj at rtems.org>
Date:      Thu Dec 19 11:35:22 2013 +1100

Revert "bsps/arm: Use ALIGN_WITH_INPUT"

This reverts commit 287bbb65afd24ffc6254ae5f328733213f184205.

Conflicts:
	c/src/lib/libbsp/arm/shared/startup/linkcmds.base

---

 .../lib/libbsp/arm/shared/include/linker-symbols.h |    6 +
 c/src/lib/libbsp/arm/shared/include/start.h        |    7 +
 c/src/lib/libbsp/arm/shared/startup/linkcmds.base  |  201 ++++++++++++--------
 3 files changed, 130 insertions(+), 84 deletions(-)

diff --git a/c/src/lib/libbsp/arm/shared/include/linker-symbols.h b/c/src/lib/libbsp/arm/shared/include/linker-symbols.h
index 6555e04..1cc1e8d 100644
--- a/c/src/lib/libbsp/arm/shared/include/linker-symbols.h
+++ b/c/src/lib/libbsp/arm/shared/include/linker-symbols.h
@@ -83,6 +83,12 @@ LINKER_SYMBOL(bsp_section_rodata_size)
 LINKER_SYMBOL(bsp_section_rodata_load_begin)
 LINKER_SYMBOL(bsp_section_rodata_load_end)
 
+LINKER_SYMBOL(bsp_section_armexidx_begin)
+LINKER_SYMBOL(bsp_section_armexidx_end)
+LINKER_SYMBOL(bsp_section_armexidx_size)
+LINKER_SYMBOL(bsp_section_armexidx_load_begin)
+LINKER_SYMBOL(bsp_section_armexidx_load_end)
+
 LINKER_SYMBOL(bsp_section_data_begin)
 LINKER_SYMBOL(bsp_section_data_end)
 LINKER_SYMBOL(bsp_section_data_size)
diff --git a/c/src/lib/libbsp/arm/shared/include/start.h b/c/src/lib/libbsp/arm/shared/include/start.h
index 2241ffc..9330271 100644
--- a/c/src/lib/libbsp/arm/shared/include/start.h
+++ b/c/src/lib/libbsp/arm/shared/include/start.h
@@ -99,6 +99,13 @@ BSP_START_TEXT_SECTION static inline void bsp_start_copy_sections(void)
     (size_t) bsp_section_rodata_size
   );
 
+  /* Copy .ARM.exidx section */
+  bsp_start_memcpy(
+    (int *) bsp_section_armexidx_begin,
+    (const int *) bsp_section_armexidx_load_begin,
+    (size_t) bsp_section_armexidx_size
+  );
+
   /* Copy .data section */
   bsp_start_memcpy(
     (int *) bsp_section_data_begin,
diff --git a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
index a401e6c..539728e 100644
--- a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
@@ -65,7 +65,7 @@ MEMORY {
 }
 
 SECTIONS {
-	.start : ALIGN_WITH_INPUT {
+	.start : {
 		bsp_section_start_begin = .;
 		KEEP (*(.bsp_start_text))
 		KEEP (*(.bsp_start_data))
@@ -73,78 +73,78 @@ SECTIONS {
 	} > REGION_START AT > REGION_START
 	bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin;
 
-	.xbarrier : ALIGN_WITH_INPUT {
+	.xbarrier : {
 		. = ALIGN (bsp_section_xbarrier_align);
 	} > REGION_VECTOR
 
-	.text : ALIGN_WITH_INPUT {
+	.text : ALIGN(32) {
 		bsp_section_text_begin = .;
+
+		/* .text */
 		*(.text.unlikely .text.*_unlikely)
 		*(.text .stub .text.* .gnu.linkonce.t.*)
 		/* .gnu.warning sections are handled specially by elf32.em.  */
 		*(.gnu.warning)
 		*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
-	} > REGION_TEXT AT > REGION_TEXT_LOAD
-	.init : ALIGN_WITH_INPUT {
+
+		/* .init */
 		KEEP (*(.init))
-	} > REGION_TEXT AT > REGION_TEXT_LOAD
-	.fini : ALIGN_WITH_INPUT {
+
+		/* .fini */
 		KEEP (*(.fini))
+
 		bsp_section_text_end = .;
 	} > REGION_TEXT AT > REGION_TEXT_LOAD
 	bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin;
 	bsp_section_text_load_begin = LOADADDR (.text);
 	bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size;
 
-	.robarrier : ALIGN_WITH_INPUT {
+	.robarrier : {
 		. = ALIGN (bsp_section_robarrier_align);
 	} > REGION_RODATA
 
-	.rodata : ALIGN_WITH_INPUT {
+	.rodata : ALIGN(32) {
 		bsp_section_rodata_begin = .;
+
+		/* .rodata */
 		*(.rodata .rodata.* .gnu.linkonce.r.*)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.rodata1 : ALIGN_WITH_INPUT {
+
+		/* .rodata1 */
 		*(.rodata1)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.ARM.extab : ALIGN_WITH_INPUT {
+
+		/* .ARM.extab */
 		*(.ARM.extab* .gnu.linkonce.armextab.*)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.ARM.exidx : ALIGN_WITH_INPUT {
-		__exidx_start = .;
-		*(.ARM.exidx* .gnu.linkonce.armexidx.*)
-		__exidx_end = .;
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.eh_frame : ALIGN_WITH_INPUT {
+
+		/* .eh_frame */
 		KEEP (*(.eh_frame))
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.gcc_except_table : ALIGN_WITH_INPUT {
+
+		/* .gcc_except_table */
 		*(.gcc_except_table .gcc_except_table.*)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.tdata : ALIGN_WITH_INPUT {
+
+		/* .tdata */
 		*(.tdata .tdata.* .gnu.linkonce.td.*)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.tbss : ALIGN_WITH_INPUT {
+
+		/* .tbss */
 		*(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.preinit_array : ALIGN_WITH_INPUT {
+
+		/* .preinit_array */
 		PROVIDE_HIDDEN (__preinit_array_start = .);
 		KEEP (*(.preinit_array))
 		PROVIDE_HIDDEN (__preinit_array_end = .);
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.init_array : ALIGN_WITH_INPUT {
+
+		/* .init_array */
 		PROVIDE_HIDDEN (__init_array_start = .);
 		KEEP (*(SORT(.init_array.*)))
 		KEEP (*(.init_array))
 		PROVIDE_HIDDEN (__init_array_end = .);
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.fini_array : ALIGN_WITH_INPUT {
+
+		/* .fini_array */
 		PROVIDE_HIDDEN (__fini_array_start = .);
 		KEEP (*(.fini_array))
 		KEEP (*(SORT(.fini_array.*)))
 		PROVIDE_HIDDEN (__fini_array_end = .);
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.ctors : ALIGN_WITH_INPUT {
+
+		/* .ctors */
 		/* gcc uses crtbegin.o to find the start of
 		   the constructors, so we make sure it is
 		   first.  Because this is a wildcard, it
@@ -163,49 +163,49 @@ SECTIONS {
 		KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
 		KEEP (*(SORT(.ctors.*)))
 		KEEP (*(.ctors))
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.dtors : ALIGN_WITH_INPUT {
+
+		/* .dtors */
 		KEEP (*crtbegin.o(.dtors))
 		KEEP (*crtbegin?.o(.dtors))
 		KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
 		KEEP (*(SORT(.dtors.*)))
 		KEEP (*(.dtors))
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.data.rel.ro : ALIGN_WITH_INPUT {
+
+		/* .data.rel.ro */
 		*(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*)
 		*(.data.rel.ro* .gnu.linkonce.d.rel.ro.*)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.jcr : ALIGN_WITH_INPUT {
+
+		/* .jcr */
 		KEEP (*(.jcr))
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.interp : ALIGN_WITH_INPUT {
+
+		/* .interp */
 		*(.interp)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.note.gnu.build-id : ALIGN_WITH_INPUT {
+
+		/* .note.gnu.build-id */
 		*(.note.gnu.build-id)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.hash : ALIGN_WITH_INPUT {
+
+		/* .hash */
 		*(.hash)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.gnu.hash : ALIGN_WITH_INPUT {
+
+		/* .gnu.hash */
 		*(.gnu.hash)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.dynsym : ALIGN_WITH_INPUT {
+
+		/* .dynsym */
 		*(.dynsym)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.dynstr : ALIGN_WITH_INPUT {
+
+		/* .dynstr */
 		*(.dynstr)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.gnu.version : ALIGN_WITH_INPUT {
+
+		/* .gnu.version */
 		*(.gnu.version)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.gnu.version_d : ALIGN_WITH_INPUT {
+
+		/* .gnu.version_d */
 		*(.gnu.version_d)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.gnu.version_r : ALIGN_WITH_INPUT {
+
+		/* .gnu.version_r */
 		*(.gnu.version_r)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.rel.dyn : ALIGN_WITH_INPUT {
+
+		/* .rel.dyn */
 		*(.rel.init)
 		*(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
 		*(.rel.fini)
@@ -223,8 +223,8 @@ SECTIONS {
 		PROVIDE_HIDDEN (__rel_iplt_end = .);
 		PROVIDE_HIDDEN (__rela_iplt_start = .);
 		PROVIDE_HIDDEN (__rela_iplt_end = .);
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.rela.dyn : ALIGN_WITH_INPUT {
+
+		/* .rela.dyn */
 		*(.rela.init)
 		*(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
 		*(.rela.fini)
@@ -241,26 +241,30 @@ SECTIONS {
 		PROVIDE_HIDDEN (__rela_iplt_start = .);
 		*(.rela.iplt)
 		PROVIDE_HIDDEN (__rela_iplt_end = .);
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.rel.plt : ALIGN_WITH_INPUT {
+
+		/* .rel.plt */
 		*(.rel.plt)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.rela.plt : ALIGN_WITH_INPUT {
+
+		/* .rela.plt */
 		*(.rela.plt)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.plt : ALIGN_WITH_INPUT {
+
+		/* .plt */
 		*(.plt)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.iplt : ALIGN_WITH_INPUT {
+
+		/* .iplt */
 		*(.iplt)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.dynamic : ALIGN_WITH_INPUT {
+
+		/* .dynamic */
 		*(.dynamic)
-	} > REGION_RODATA AT > REGION_RODATA_LOAD
-	.got : ALIGN_WITH_INPUT {
+
+		/* .got */
 		*(.got.plt) *(.igot.plt) *(.got) *(.igot)
+<<<<<<< HEAD
 	} > REGION_RODATA AT > REGION_RODATA_LOAD
 	.rtemsroset : ALIGN_WITH_INPUT {
+=======
+
+>>>>>>> parent of 287bbb6... bsps/arm: Use ALIGN_WITH_INPUT
 		/* Special FreeBSD linker set sections */
 		__start_set_sysctl_set = .;
 		*(set_sysctl_*);
@@ -275,11 +279,25 @@ SECTIONS {
 	bsp_section_rodata_load_begin = LOADADDR (.rodata);
 	bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size;
 
-	.rwbarrier : ALIGN_WITH_INPUT {
+	.ARM.exidx : ALIGN(32) {
+		bsp_section_armexidx_begin = .;
+
+		/* .ARM.exidx */
+		__exidx_start = .;
+		*(.ARM.exidx* .gnu.linkonce.armexidx.*)
+		__exidx_end = .;
+
+		bsp_section_armexidx_end = .;
+	} > REGION_RODATA AT > REGION_RODATA_LOAD
+	bsp_section_armexidx_size = bsp_section_armexidx_end - bsp_section_armexidx_begin;
+	bsp_section_armexidx_load_begin = LOADADDR (.ARM.exidx);
+	bsp_section_armexidx_load_end = bsp_section_armexidx_load_begin + bsp_section_armexidx_size;
+
+	.rwbarrier : {
 		. = ALIGN (bsp_section_rwbarrier_align);
 	} > REGION_DATA
 
-	.vector : ALIGN_WITH_INPUT {
+	.vector : {
 		bsp_section_vector_begin = .;
 
 		. = . + DEFINED (bsp_vector_table_in_start_section) ? 0 : bsp_vector_table_size;
@@ -315,13 +333,14 @@ SECTIONS {
 		bsp_stack_secondary_processors_end = .;
 
 		*(.bsp_vector)
+
 		bsp_section_vector_end = .;
 	} > REGION_VECTOR AT > REGION_VECTOR
 	bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin;
 	bsp_vector_table_begin = DEFINED (bsp_vector_table_in_start_section) ? bsp_section_start_begin : bsp_section_vector_begin;
 	bsp_vector_table_end = bsp_vector_table_begin + bsp_vector_table_size;
 
-	.fast_text : ALIGN_WITH_INPUT {
+	.fast_text : {
 		bsp_section_fast_text_begin = .;
 		*(.bsp_fast_text)
 		bsp_section_fast_text_end = .;
@@ -330,7 +349,7 @@ SECTIONS {
 	bsp_section_fast_text_load_begin = LOADADDR (.fast_text);
 	bsp_section_fast_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size;
 
-	.fast_data : ALIGN_WITH_INPUT {
+	.fast_data : ALIGN(32) {
 		bsp_section_fast_data_begin = .;
 		*(.bsp_fast_data)
 		bsp_section_fast_data_end = .;
@@ -339,32 +358,46 @@ SECTIONS {
 	bsp_section_fast_data_load_begin = LOADADDR (.fast_data);
 	bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size;
 
-	.data : ALIGN_WITH_INPUT {
+	.data : ALIGN(32) {
 		bsp_section_data_begin = .;
+
+		/* .data */
 		*(.data .data.* .gnu.linkonce.d.*)
 		SORT(CONSTRUCTORS)
-	} > REGION_DATA AT > REGION_DATA_LOAD
-	.data1 : ALIGN_WITH_INPUT {
+
+		/* .data1 */
 		*(.data1)
+<<<<<<< HEAD
 	} > REGION_DATA AT > REGION_DATA_LOAD
 	.rtemsrwset : ALIGN_WITH_INPUT {
 		KEEP (*(SORT(.rtemsrwset.*)))
+=======
+
+		/* Special FreeBSD linker set sections */
+		_bsd__start_set_sysinit_set = .;
+		*(_bsd_set_sysinit_set);
+		_bsd__stop_set_sysinit_set = .;
+
+>>>>>>> parent of 287bbb6... bsps/arm: Use ALIGN_WITH_INPUT
 		bsp_section_data_end = .;
 	} > REGION_DATA AT > REGION_DATA_LOAD
 	bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin;
 	bsp_section_data_load_begin = LOADADDR (.data);
 	bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size;
 
-	.bss : ALIGN_WITH_INPUT {
+	.bss : {
 		bsp_section_bss_begin = .;
+
+		/* .bss */
 		*(.dynbss)
 		*(.bss .bss.* .gnu.linkonce.b.*)
 		*(COMMON)
+
 		bsp_section_bss_end = .;
 	} > REGION_BSS AT > REGION_BSS
 	bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
 
-	.work : ALIGN_WITH_INPUT {
+	.work : {
 		/*
 		 * The work section will occupy the remaining REGION_WORK region and
 		 * contains the RTEMS work space and heap.
@@ -375,7 +408,7 @@ SECTIONS {
 	} > REGION_WORK AT > REGION_WORK
 	bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin;
 
-	.stack : ALIGN_WITH_INPUT {
+	.stack : {
 		/*
 		 * The stack section will occupy the remaining REGION_STACK region and may
 		 * contain the task stacks.  Depending on the region distribution this




More information about the vc mailing list