lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
|
Last change
on this file since 8d3f198 was 54146a0, checked in by Jiri Svoboda <jiri@…>, 14 years ago |
|
Add missing sections to ia32 linker script. Now we discard debugging sections
from shared libs and dynamically linked executables.
|
-
Property mode
set to
100644
|
|
File size:
2.1 KB
|
| Line | |
|---|
| 1 | #ifndef SHLIB
|
|---|
| 2 | STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
|
|---|
| 3 | ENTRY(__entry)
|
|---|
| 4 | #endif
|
|---|
| 5 |
|
|---|
| 6 | PHDRS {
|
|---|
| 7 | #if defined(LOADER) || defined(DLEXE)
|
|---|
| 8 | interp PT_INTERP;
|
|---|
| 9 | text PT_LOAD FILEHDR PHDRS FLAGS(5);
|
|---|
| 10 | #else
|
|---|
| 11 | text PT_LOAD FLAGS(5);
|
|---|
| 12 | #endif
|
|---|
| 13 | data PT_LOAD FLAGS(6);
|
|---|
| 14 | #if defined(SHLIB) || defined(DLEXE)
|
|---|
| 15 | dynamic PT_DYNAMIC;
|
|---|
| 16 | #endif
|
|---|
| 17 | debug PT_NOTE;
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | SECTIONS {
|
|---|
| 21 | #if defined(LOADER) || defined(DLEXE)
|
|---|
| 22 | .interp : {
|
|---|
| 23 | *(.interp);
|
|---|
| 24 | } :interp
|
|---|
| 25 | #endif
|
|---|
| 26 | #ifdef LOADER
|
|---|
| 27 | . = 0x70001000 + SIZEOF_HEADERS;
|
|---|
| 28 | #else
|
|---|
| 29 | . = 0x1000 + SIZEOF_HEADERS;
|
|---|
| 30 | #endif
|
|---|
| 31 | .init : {
|
|---|
| 32 | *(.init);
|
|---|
| 33 | } :text
|
|---|
| 34 |
|
|---|
| 35 | .text : {
|
|---|
| 36 | *(.text .text.*);
|
|---|
| 37 | *(.rodata .rodata.*);
|
|---|
| 38 | } :text
|
|---|
| 39 |
|
|---|
| 40 | #if defined(SHLIB) || defined(DLEXE)
|
|---|
| 41 | .rel.plt : {
|
|---|
| 42 | *(.rel.plt);
|
|---|
| 43 | }
|
|---|
| 44 | /*
|
|---|
| 45 | *.rel.dyn MUST FOLLOW IMMEDIATELY after .rel.plt
|
|---|
| 46 | * without alignment gap or DT_REL will be broken
|
|---|
| 47 | */
|
|---|
| 48 | .rel.dyn : {
|
|---|
| 49 | *(.rel.*);
|
|---|
| 50 | } :text
|
|---|
| 51 |
|
|---|
| 52 | .plt : {
|
|---|
| 53 | *(.plt);
|
|---|
| 54 | } :text
|
|---|
| 55 |
|
|---|
| 56 | .dynsym : {
|
|---|
| 57 | *(.dynsym);
|
|---|
| 58 | } :text
|
|---|
| 59 |
|
|---|
| 60 | .dynstr : {
|
|---|
| 61 | *(.dynstr);
|
|---|
| 62 | } :text
|
|---|
| 63 |
|
|---|
| 64 | .hash : {
|
|---|
| 65 | *(.hash);
|
|---|
| 66 | } :text
|
|---|
| 67 | #endif
|
|---|
| 68 | . = . + 0x1000;
|
|---|
| 69 |
|
|---|
| 70 | #if defined(SHLIB) || defined(DLEXE)
|
|---|
| 71 | .dynamic : {
|
|---|
| 72 | *(.dynamic);
|
|---|
| 73 | } :data :dynamic
|
|---|
| 74 | #endif
|
|---|
| 75 |
|
|---|
| 76 | .data : {
|
|---|
| 77 | *(.data);
|
|---|
| 78 | } :data
|
|---|
| 79 |
|
|---|
| 80 | #if defined(SHLIB) || defined(DLEXE)
|
|---|
| 81 | .data.rel : {
|
|---|
| 82 | *(.data.rel .data.rel.*);
|
|---|
| 83 | } :data
|
|---|
| 84 |
|
|---|
| 85 | .got : {
|
|---|
| 86 | *(.got);
|
|---|
| 87 | } :data
|
|---|
| 88 | .got.plt : {
|
|---|
| 89 | *(.got.plt);
|
|---|
| 90 | } :data
|
|---|
| 91 | #endif
|
|---|
| 92 |
|
|---|
| 93 | #ifndef DLEXE
|
|---|
| 94 | .tdata : {
|
|---|
| 95 | _tdata_start = .;
|
|---|
| 96 | *(.tdata);
|
|---|
| 97 | *(.gnu.linkonce.tb.*);
|
|---|
| 98 | _tdata_end = .;
|
|---|
| 99 | _tbss_start = .;
|
|---|
| 100 | *(.tbss);
|
|---|
| 101 | _tbss_end = .;
|
|---|
| 102 | } :data
|
|---|
| 103 |
|
|---|
| 104 | _tls_alignment = ALIGNOF(.tdata);
|
|---|
| 105 | #endif
|
|---|
| 106 |
|
|---|
| 107 | .bss : {
|
|---|
| 108 | *(.dynbss);
|
|---|
| 109 | *(COMMON);
|
|---|
| 110 | *(.bss);
|
|---|
| 111 | } :data
|
|---|
| 112 |
|
|---|
| 113 | #ifdef CONFIG_LINE_DEBUG
|
|---|
| 114 | .comment 0 : { *(.comment); } :debug
|
|---|
| 115 | .debug_abbrev 0 : { *(.debug_abbrev); } :debug
|
|---|
| 116 | .debug_aranges 0 : { *(.debug_aranges); } :debug
|
|---|
| 117 | .debug_info 0 : { *(.debug_info); } :debug
|
|---|
| 118 | .debug_line 0 : { *(.debug_line); } :debug
|
|---|
| 119 | .debug_loc 0 : { *(.debug_loc); } :debug
|
|---|
| 120 | .debug_pubnames 0 : { *(.debug_pubnames); } :debug
|
|---|
| 121 | .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug
|
|---|
| 122 | .debug_ranges 0 : { *(.debug_ranges); } :debug
|
|---|
| 123 | .debug_str 0 : { *(.debug_str); } :debug
|
|---|
| 124 | #endif
|
|---|
| 125 |
|
|---|
| 126 | /DISCARD/ : {
|
|---|
| 127 | *(*);
|
|---|
| 128 | }
|
|---|
| 129 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.