source:
mainline/uspace/lib/c/arch/abs32le/_link.ld.in@
5f97ef44
| Last change on this file since 5f97ef44 was 2eadda9, checked in by , 7 years ago | |
|---|---|
|
|
| File size: 1.2 KB | |
| Rev | Line | |
|---|---|---|
| [fc0b2a8] | 1 | ENTRY(_start) |
| 2 | ||
| 3 | PHDRS { | |
| 4 | text PT_LOAD FILEHDR PHDRS FLAGS(5); | |
| 5 | data PT_LOAD FLAGS(6); | |
| 6 | tls PT_TLS; | |
| 7 | } | |
| 8 | ||
| 9 | SECTIONS { | |
| 10 | #ifdef SHLIB | |
| 11 | . = SEGMENT_START("text-segment", 0); | |
| 12 | #else | |
| 13 | . = SEGMENT_START("text-segment", 0x400000); | |
| 14 | PROVIDE (__executable_start = .); | |
| 15 | #endif | |
| 16 | . = . + SIZEOF_HEADERS; | |
| 17 | ||
| 18 | .text : { | |
| 19 | *(.text .text.*); | |
| 20 | *(.rodata .rodata.*); | |
| 21 | } :text | |
| 22 | ||
| 23 | . = . + 0x1000; | |
| 24 | ||
| 25 | .data : { | |
| 26 | *(.data); | |
| 27 | *(.data.rel*); | |
| 28 | } :data | |
| 29 | ||
| 30 | .got.plt : { | |
| 31 | *(.got.plt); | |
| 32 | } :data | |
| 33 | ||
| 34 | .tdata : { | |
| 35 | *(.tdata); | |
| 36 | *(.tdata.*); | |
| 37 | *(.gnu.linkonce.td.*); | |
| 38 | } :data :tls | |
| 39 | ||
| 40 | .tbss : { | |
| 41 | *(.tbss); | |
| 42 | *(.tbss.*); | |
| 43 | *(.gnu.linkonce.tb.*); | |
| 44 | } :data :tls | |
| 45 | ||
| 46 | .sbss : { | |
| 47 | *(.scommon); | |
| 48 | *(.sbss); | |
| 49 | } | |
| 50 | ||
| 51 | .bss : { | |
| 52 | *(COMMON); | |
| 53 | *(.bss); | |
| 54 | } :data | |
| 55 | ||
| [be0f5e4] | 56 | __dso_handle = .; |
| [09553a0] | 57 | |
| 58 | .init_array : { | |
| [2eadda9] | 59 | #ifndef SHLIB |
| [09553a0] | 60 | PROVIDE_HIDDEN (__init_array_start = .); |
| [2eadda9] | 61 | #endif |
| [09553a0] | 62 | KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) |
| 63 | KEEP (*(.init_array .ctors)) | |
| [2eadda9] | 64 | #ifndef SHLIB |
| [09553a0] | 65 | PROVIDE_HIDDEN (__init_array_end = .); |
| [2eadda9] | 66 | #endif |
| [09553a0] | 67 | } |
| 68 | ||
| 69 | .fini_array : { | |
| [2eadda9] | 70 | #ifndef SHLIB |
| [09553a0] | 71 | PROVIDE_HIDDEN (__fini_array_start = .); |
| [2eadda9] | 72 | #endif |
| [09553a0] | 73 | KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) |
| 74 | KEEP (*(.fini_array .dtors)) | |
| [2eadda9] | 75 | #ifndef SHLIB |
| [09553a0] | 76 | PROVIDE_HIDDEN (__fini_array_end = .); |
| [2eadda9] | 77 | #endif |
| [09553a0] | 78 | } |
| 79 | ||
| [fc0b2a8] | 80 | _end = .; |
| 81 | ||
| 82 | /DISCARD/ : { | |
| 83 | *(*); | |
| 84 | } | |
| 85 | } |
Note:
See TracBrowser
for help on using the repository browser.
