Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/conf reduce the battlefield



details:   https://anonhg.NetBSD.org/src/rev/eda6af8ca5a5
branches:  trunk
changeset: 433375:eda6af8ca5a5
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Sep 10 17:25:21 2018 +0000

description:
reduce the battlefield

diffstat:

 sys/arch/aarch64/conf/kern.ldscript |  74 +++++++++++++-----------------------
 1 files changed, 27 insertions(+), 47 deletions(-)

diffs (116 lines):

diff -r 31e54c67a229 -r eda6af8ca5a5 sys/arch/aarch64/conf/kern.ldscript
--- a/sys/arch/aarch64/conf/kern.ldscript       Mon Sep 10 17:25:15 2018 +0000
+++ b/sys/arch/aarch64/conf/kern.ldscript       Mon Sep 10 17:25:21 2018 +0000
@@ -10,55 +10,37 @@
 {
        .text :
        {
-               PROVIDE (__kernel_text = .);
-               PROVIDE_HIDDEN (__eprol = .);
+               PROVIDE(__kernel_text = .);
                *(.text)
-               *(.text.unlikely .text.*_unlikely)
-               *(.text.exit .text.exit.*)
-               *(.text.startup .text.startup.*)
-               *(.text.hot .text.hot.*)
-               *(.stub .text.* .gnu.linkonce.t.*)
-               /* .gnu.warning sections are handled specially by elf32.em.  */
+               *(.text.*)
+               *(.stub)
        } =0
 
        /* Move .rodata to the next L2 block to set unexecutable */
-       . = ALIGN (L2_SIZE);
-       PROVIDE (__rodata_start = .);
-       .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
-       .rodata1        : { *(.rodata1) }
-       .eh_frame_hdr : { *(.eh_frame_hdr) }
-       .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-       .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
-       .gcc_except_table.*) }
+       . = ALIGN(L2_SIZE);
 
-       /* These sections are generated by the Sun/Oracle C++ compiler.  */
-       .exception_ranges   : ONLY_IF_RO { *(.exception_ranges
-       .exception_ranges*) }
-       PROVIDE (__etext = .);
-       PROVIDE (_etext = .);
-       PROVIDE (etext = .);
+       PROVIDE(__rodata_start = .);
+       .rodata :
+       {
+               *(.rodata)
+               *(.rodata.*)
+       }
+
+       PROVIDE(_etext = .);
+       PROVIDE(etext = .);
 
        /*
         * Adjust the address for the data segment. Move .data to the next
         * L2 block, and .text and .rodata will be set readonly if needed.
         */
-       PROVIDE (_erodata = .);
-       . = ALIGN (L2_SIZE);
-       . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
-       /* Exception handling  */
-       .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-       .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
-       .exception_ranges   : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
-       .got            : { *(.got) *(.igot) }
-       . = DATA_SEGMENT_RELRO_END (24, .);
-       .got.plt        : { *(.got.plt)  *(.igot.plt) }
-       .data           :
+       PROVIDE(_erodata = .);
+       . = ALIGN(L2_SIZE);
+
+       .data :
        {
-               PROVIDE (__data_start = .);
-               *(.data .gnu.linkonce.d.*)
-               SORT(CONSTRUCTORS)
+               PROVIDE(__data_start = .);
+               *(.data)
        }
-       .data1          : { *(.data1) }
 
        . = ALIGN(64);  /* COHERENCY_UNIT */
        .data.cacheline_aligned :
@@ -72,15 +54,15 @@
        }
        . = ALIGN(64);  /* COHERENCY_UNIT */
 
-       _edata = .; PROVIDE (edata = .);
-       . = .;
+       _edata = .;
+       PROVIDE (edata = .);
 
        __bss_start = .;
        __bss_start__ = .;
        .bss :
        {
-               *(.dynbss)
-               *(.bss .bss.* .gnu.linkonce.b.*)
+               *(.bss)
+               *(.bss.*)
                *(COMMON)
 
                /*
@@ -94,13 +76,11 @@
                 */
                . = ALIGN(. != 0 ? 32 / 8 : 1);
        }
-       _bss_end__ = . ; __bss_end__ = . ;
-       . = ALIGN(32 / 8);
+       _bss_end__ = . ;
+       __bss_end__ = . ;
        . = ALIGN(32 / 8);
 
        __end__ = . ;
-       _end = .; PROVIDE (end = .);
-       . = DATA_SEGMENT_END (.);
-       .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
-       .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
+       _end = .;
+       PROVIDE(end = .);
 }



Home | Main Index | Thread Index | Old Index