lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
|
Last change
on this file since e1c0260 was e1c0260, checked in by Martin Decky <martin@…>, 13 years ago |
|
improve loader .interp fix
- suppress the assembler warning by setting @progbits on the .interp section
- suppress the linker warning by putting the .interp section additionally into the "text" segment
- use the same ATSIGN convetion as the kernel makefiles use (for consistency)
|
-
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 | #ifdef LOADER
|
|---|
| 22 | . = 0x70001000 + SIZEOF_HEADERS;
|
|---|
| 23 | #else
|
|---|
| 24 | . = 0x1000 + SIZEOF_HEADERS;
|
|---|
| 25 | #endif
|
|---|
| 26 |
|
|---|
| 27 | #if defined(LOADER) || defined(DLEXE)
|
|---|
| 28 | .interp : {
|
|---|
| 29 | *(.interp);
|
|---|
| 30 | } :interp :text
|
|---|
| 31 | #endif
|
|---|
| 32 |
|
|---|
| 33 | .init : {
|
|---|
| 34 | *(.init);
|
|---|
| 35 | } :text
|
|---|
| 36 |
|
|---|
| 37 | .text : {
|
|---|
| 38 | *(.text .text.*);
|
|---|
| 39 | *(.rodata .rodata.*);
|
|---|
| 40 | } :text
|
|---|
| 41 |
|
|---|
| 42 | #if defined(SHLIB) || defined(DLEXE)
|
|---|
| 43 | .rel.plt : {
|
|---|
| 44 | *(.rel.plt);
|
|---|
| 45 | }
|
|---|
| 46 | /*
|
|---|
| 47 | *.rel.dyn MUST FOLLOW IMMEDIATELY after .rel.plt
|
|---|
| 48 | * without alignment gap or DT_REL will be broken
|
|---|
| 49 | */
|
|---|
| 50 | .rel.dyn : {
|
|---|
| 51 | *(.rel.*);
|
|---|
| 52 | } :text
|
|---|
| 53 |
|
|---|
| 54 | .plt : {
|
|---|
| 55 | *(.plt);
|
|---|
| 56 | } :text
|
|---|
| 57 |
|
|---|
| 58 | .dynsym : {
|
|---|
| 59 | *(.dynsym);
|
|---|
| 60 | } :text
|
|---|
| 61 |
|
|---|
| 62 | .dynstr : {
|
|---|
| 63 | *(.dynstr);
|
|---|
| 64 | } :text
|
|---|
| 65 |
|
|---|
| 66 | .hash : {
|
|---|
| 67 | *(.hash);
|
|---|
| 68 | } :text
|
|---|
| 69 | #endif
|
|---|
| 70 | . = . + 0x1000;
|
|---|
| 71 |
|
|---|
| 72 | #if defined(SHLIB) || defined(DLEXE)
|
|---|
| 73 | .dynamic : {
|
|---|
| 74 | *(.dynamic);
|
|---|
| 75 | } :data :dynamic
|
|---|
| 76 | #endif
|
|---|
| 77 |
|
|---|
| 78 | .data : {
|
|---|
| 79 | *(.data);
|
|---|
| 80 | } :data
|
|---|
| 81 |
|
|---|
| 82 | #if defined(SHLIB) || defined(DLEXE)
|
|---|
| 83 | .data.rel : {
|
|---|
| 84 | *(.data.rel .data.rel.*);
|
|---|
| 85 | } :data
|
|---|
| 86 |
|
|---|
| 87 | .got : {
|
|---|
| 88 | *(.got);
|
|---|
| 89 | } :data
|
|---|
| 90 | .got.plt : {
|
|---|
| 91 | *(.got.plt);
|
|---|
| 92 | } :data
|
|---|
| 93 | #endif
|
|---|
| 94 |
|
|---|
| 95 | #ifndef DLEXE
|
|---|
| 96 | .tdata : {
|
|---|
| 97 | _tdata_start = .;
|
|---|
| 98 | *(.tdata);
|
|---|
| 99 | *(.gnu.linkonce.tb.*);
|
|---|
| 100 | _tdata_end = .;
|
|---|
| 101 | _tbss_start = .;
|
|---|
| 102 | *(.tbss);
|
|---|
| 103 | _tbss_end = .;
|
|---|
| 104 | } :data
|
|---|
| 105 |
|
|---|
| 106 | _tls_alignment = ALIGNOF(.tdata);
|
|---|
| 107 | #endif
|
|---|
| 108 |
|
|---|
| 109 | .bss : {
|
|---|
| 110 | *(.dynbss);
|
|---|
| 111 | *(COMMON);
|
|---|
| 112 | *(.bss);
|
|---|
| 113 | } :data
|
|---|
| 114 |
|
|---|
| 115 | #ifdef CONFIG_LINE_DEBUG
|
|---|
| 116 | .comment 0 : { *(.comment); } :debug
|
|---|
| 117 | .debug_abbrev 0 : { *(.debug_abbrev); } :debug
|
|---|
| 118 | .debug_aranges 0 : { *(.debug_aranges); } :debug
|
|---|
| 119 | .debug_info 0 : { *(.debug_info); } :debug
|
|---|
| 120 | .debug_line 0 : { *(.debug_line); } :debug
|
|---|
| 121 | .debug_loc 0 : { *(.debug_loc); } :debug
|
|---|
| 122 | .debug_pubnames 0 : { *(.debug_pubnames); } :debug
|
|---|
| 123 | .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug
|
|---|
| 124 | .debug_ranges 0 : { *(.debug_ranges); } :debug
|
|---|
| 125 | .debug_str 0 : { *(.debug_str); } :debug
|
|---|
| 126 | #endif
|
|---|
| 127 |
|
|---|
| 128 | /DISCARD/ : {
|
|---|
| 129 | *(*);
|
|---|
| 130 | }
|
|---|
| 131 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.