[rtems commit] bsps: Simplify FreeBSD linker sets
Sebastian Huber
sebh at rtems.org
Mon Dec 16 14:13:16 UTC 2013
Module: rtems
Branch: master
Commit: e4927eceff2cd82ad24600a1e53a99d8996d843e
Changeset: http://git.rtems.org/rtems/commit/?id=e4927eceff2cd82ad24600a1e53a99d8996d843e
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Dec 4 15:39:20 2013 +0100
bsps: Simplify FreeBSD linker sets
---
c/src/lib/libbsp/arm/shared/startup/linkcmds.base | 17 ++++-------------
c/src/lib/libbsp/i386/pc386/startup/linkcmds | 18 +++---------------
c/src/lib/libbsp/mips/jmr3904/startup/linkcmds | 19 ++++++-------------
c/src/lib/libbsp/mips/malta/startup/linkcmds | 20 +++++++-------------
.../libbsp/powerpc/shared/startup/linkcmds.base | 16 ++++------------
c/src/lib/libbsp/sh/shsim/startup/linkcmds | 20 +++++---------------
.../lib/libbsp/sparc/shared/startup/linkcmds.base | 18 +++++-------------
7 files changed, 34 insertions(+), 94 deletions(-)
diff --git a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
index 8920f38..a401e6c 100644
--- a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
@@ -260,20 +260,15 @@ SECTIONS {
.got : ALIGN_WITH_INPUT {
*(.got.plt) *(.igot.plt) *(.got) *(.igot)
} > REGION_RODATA AT > REGION_RODATA_LOAD
- .robsdsets : ALIGN_WITH_INPUT {
+ .rtemsroset : ALIGN_WITH_INPUT {
/* Special FreeBSD linker set sections */
__start_set_sysctl_set = .;
*(set_sysctl_*);
__stop_set_sysctl_set = .;
*(set_domain_*);
*(set_pseudo_*);
- _bsd__start_set_modmetadata_set = .;
- *(_bsd_set_modmetadata_set);
- _bsd__stop_set_modmetadata_set = .;
- _bsd__start_set_sysctl_set = .;
- *(_bsd_set_sysctl_set);
- _bsd__stop_set_sysctl_set = .;
+ KEEP (*(SORT(.rtemsroset.*)))
bsp_section_rodata_end = .;
} > REGION_RODATA AT > REGION_RODATA_LOAD
bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin;
@@ -352,12 +347,8 @@ SECTIONS {
.data1 : ALIGN_WITH_INPUT {
*(.data1)
} > REGION_DATA AT > REGION_DATA_LOAD
- .rwbsdsets : ALIGN_WITH_INPUT {
- /* Special FreeBSD linker set sections */
- _bsd__start_set_sysinit_set = .;
- *(_bsd_set_sysinit_set);
- _bsd__stop_set_sysinit_set = .;
-
+ .rtemsrwset : ALIGN_WITH_INPUT {
+ KEEP (*(SORT(.rtemsrwset.*)))
bsp_section_data_end = .;
} > REGION_DATA AT > REGION_DATA_LOAD
bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin;
diff --git a/c/src/lib/libbsp/i386/pc386/startup/linkcmds b/c/src/lib/libbsp/i386/pc386/startup/linkcmds
index 599a9b2..04d5fea 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/linkcmds
+++ b/c/src/lib/libbsp/i386/pc386/startup/linkcmds
@@ -73,7 +73,7 @@ SECTIONS
} =0x90909090
- .robsdsets : {
+ .rtemsroset : {
/* for pre rtems-libbsd FreeBSD code */
__start_set_sysctl_set = .;
*(set_sysctl_*);
@@ -81,20 +81,7 @@ SECTIONS
*(set_domain_*);
*(set_pseudo_*);
- /* for rtems-libbsd FreeBSD code */
- _bsd__start_set_modmetadata_set = .;
- *(_bsd_set_modmetadata_set);
- _bsd__stop_set_modmetadata_set = .;
-
- _bsd__start_set_sysctl_set = .;
- *(_bsd_set_sysctl_set);
- _bsd__stop_set_sysctl_set = .;
-
- _bsd__start_set_sysinit_set = .;
- *(_bsd_set_sysinit_*);
- _bsd__stop_set_sysinit_set = .;
-
- bsp_section_rodata_end = .;
+ KEEP (*(SORT(.rtemsroset.*)))
} =0x90909090
.init :
@@ -184,6 +171,7 @@ SECTIONS
SORT(CONSTRUCTORS)
}
.data1 : { *(.data1) }
+ .rtemsrwset : { KEEP (*(SORT(.rtemsrwset.*))) }
_edata = .; PROVIDE (edata = .);
__bss_start = .;
.bss :
diff --git a/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds b/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds
index 27c777a..1360bf4 100644
--- a/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds
+++ b/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds
@@ -30,7 +30,7 @@ SECTIONS
*(.eh_frame)
}
- .robsdsets : {
+ .rtemsroset : {
/* for pre rtems-libbsd FreeBSD code */
__start_set_sysctl_set = .;
*(set_sysctl_*);
@@ -38,18 +38,7 @@ SECTIONS
*(set_domain_*);
*(set_pseudo_*);
- /* for rtems-libbsd FreeBSD code */
- _bsd__start_set_modmetadata_set = .;
- *(_bsd_set_modmetadata_set);
- _bsd__stop_set_modmetadata_set = .;
-
- _bsd__start_set_sysctl_set = .;
- *(_bsd_set_sysctl_set);
- _bsd__stop_set_sysctl_set = .;
-
- _bsd__start_set_sysinit_set = .;
- *(_bsd_set_sysinit_*);
- _bsd__stop_set_sysinit_set = .;
+ KEEP (*(SORT(.rtemsroset.*)))
. = ALIGN (16);
_endtext = .;
@@ -114,6 +103,10 @@ SECTIONS
*(.gnu.linkonce.d*)
SORT(CONSTRUCTORS)
}
+
+ .rtemsrwset : {
+ KEEP (*(SORT(.rtemsrwset.*)))
+ }
. = ALIGN(8);
.jcr : {
diff --git a/c/src/lib/libbsp/mips/malta/startup/linkcmds b/c/src/lib/libbsp/mips/malta/startup/linkcmds
index 4ba76de..0b11b9c 100644
--- a/c/src/lib/libbsp/mips/malta/startup/linkcmds
+++ b/c/src/lib/libbsp/mips/malta/startup/linkcmds
@@ -75,7 +75,7 @@ SECTIONS
_etext = .;
}
- .robsdsets : {
+ .rtemsroset : {
/* for pre rtems-libbsd FreeBSD code */
__start_set_sysctl_set = .;
*(set_sysctl_*);
@@ -83,18 +83,7 @@ SECTIONS
*(set_domain_*);
*(set_pseudo_*);
- /* for rtems-libbsd FreeBSD code */
- _bsd__start_set_modmetadata_set = .;
- *(_bsd_set_modmetadata_set);
- _bsd__stop_set_modmetadata_set = .;
-
- _bsd__start_set_sysctl_set = .;
- *(_bsd_set_sysctl_set);
- _bsd__stop_set_sysctl_set = .;
-
- _bsd__start_set_sysinit_set = .;
- *(_bsd_set_sysinit_*);
- _bsd__stop_set_sysinit_set = .;
+ KEEP (*(SORT(.rtemsroset.*)))
. = ALIGN (16);
_endtext = .;
@@ -114,6 +103,11 @@ SECTIONS
*(.gnu.linkonce.d*)
SORT(CONSTRUCTORS)
}
+
+ .rtemsrwset : {
+ KEEP (*(SORT(.rtemsrwset.*)))
+ }
+
. = ALIGN(8);
.jcr : {
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
index e90a2ef..5a330d6 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
@@ -226,20 +226,15 @@ SECTIONS {
.rela.plt : ALIGN_WITH_INPUT {
*(.rela.plt)
} > REGION_RODATA AT > REGION_RODATA_LOAD
- .robsdsets : ALIGN_WITH_INPUT {
+ .rtemsroset : ALIGN_WITH_INPUT {
/* Special FreeBSD linker set sections */
__start_set_sysctl_set = .;
*(set_sysctl_*);
__stop_set_sysctl_set = .;
*(set_domain_*);
*(set_pseudo_*);
- _bsd__start_set_modmetadata_set = .;
- *(_bsd_set_modmetadata_set);
- _bsd__stop_set_modmetadata_set = .;
- _bsd__start_set_sysctl_set = .;
- *(_bsd_set_sysctl_set);
- _bsd__stop_set_sysctl_set = .;
+ KEEP (*(SORT(.rtemsroset.*)))
bsp_section_rodata_end = .;
} > REGION_RODATA AT > REGION_RODATA_LOAD
bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin;
@@ -268,11 +263,8 @@ SECTIONS {
.data1 : ALIGN_WITH_INPUT {
*(.data1)
} > REGION_DATA AT > REGION_DATA_LOAD
- .rwbsdsets : ALIGN_WITH_INPUT {
- /* Special FreeBSD linker set sections */
- _bsd__start_set_sysinit_set = .;
- *(_bsd_set_sysinit_set);
- _bsd__stop_set_sysinit_set = .;
+ .rtemsrwset : ALIGN_WITH_INPUT {
+ KEEP (*(SORT(.rtemsrwset.*)))
} > REGION_DATA AT > REGION_DATA_LOAD
.sdata : ALIGN_WITH_INPUT {
PROVIDE (_SDA_BASE_ = 32768);
diff --git a/c/src/lib/libbsp/sh/shsim/startup/linkcmds b/c/src/lib/libbsp/sh/shsim/startup/linkcmds
index d85a3d6..a12af48 100644
--- a/c/src/lib/libbsp/sh/shsim/startup/linkcmds
+++ b/c/src/lib/libbsp/sh/shsim/startup/linkcmds
@@ -157,7 +157,7 @@ SECTIONS
*(.dtors)
___dtors_end = .;
}
- .robsdsets : {
+ .rtemsroset : {
/* for pre rtems-libbsd FreeBSD code */
__start_set_sysctl_set = .;
*(set_sysctl_*);
@@ -165,20 +165,10 @@ SECTIONS
*(set_domain_*);
*(set_pseudo_*);
- /* for rtems-libbsd FreeBSD code */
- __bsd__start_set_modmetadata_set = .;
- *(_bsd_set_modmetadata_set);
- __bsd__stop_set_modmetadata_set = .;
-
- __bsd__start_set_sysctl_set = .;
- *(_bsd_set_sysctl_set);
- __bsd__stop_set_sysctl_set = .;
-
- __bsd__start_set_sysinit_set = .;
- *(_bsd_set_sysinit_*);
- __bsd__stop_set_sysinit_set = .;
-
- _bsp_section_rodata_end = .;
+ KEEP (*(SORT(.rtemsroset.*)))
+ } >ram
+ .rtemsrwset : {
+ KEEP (*(SORT(.rtemsrwset.*)))
} >ram
.got . : { *(.got.plt) *(.got) }
diff --git a/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base b/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base
index fd91085..91663df 100644
--- a/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base
@@ -108,7 +108,7 @@ SECTIONS
*(.shdata)
. = ALIGN (16);
} > ram
- .robsdsets : {
+ .rtemsroset : {
/* for pre rtems-libbsd FreeBSD code */
__start_set_sysctl_set = .;
KEEP(*(set_sysctl_*));
@@ -116,18 +116,7 @@ SECTIONS
KEEP(*(set_domain_*));
KEEP(*(set_pseudo_*));
- /* for rtems-libbsd FreeBSD code */
- _bsd__start_set_modmetadata_set = .;
- KEEP(*(_bsd_set_modmetadata_set));
- _bsd__stop_set_modmetadata_set = .;
-
- _bsd__start_set_sysctl_set = .;
- KEEP(*(_bsd_set_sysctl_set));
- _bsd__stop_set_sysctl_set = .;
-
- _bsd__start_set_sysinit_set = .;
- KEEP(*(_bsd_set_sysinit_*));
- _bsd__stop_set_sysinit_set = .;
+ KEEP (*(SORT(.rtemsroset.*)))
. = ALIGN (16);
_endtext = .;
@@ -158,6 +147,9 @@ SECTIONS
edata = .;
_edata = .;
} > ram
+ .rtemsrwset : {
+ KEEP (*(SORT(.rtemsrwset.*)))
+ } >ram
.dynamic : { *(.dynamic) } >ram
.jcr : { *(.jcr) } >ram
.got : { *(.got) } >ram
More information about the vc
mailing list