source: mainline/uspace/lib/c/arch/amd64/_link.ld.in@ f73b291

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since f73b291 was 9bcdbc5, checked in by Martin Decky <martin@…>, 13 years ago

make sure the code in .init is always aligned reasonably
(despite .interp section being also present in the text segment)

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[1b1164e8]1STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
[1a030b8]2ENTRY(__entry)
3
[d03e156]4PHDRS {
[c53d906]5#ifdef LOADER
6 interp PT_INTERP;
7 text PT_LOAD FILEHDR PHDRS FLAGS(5);
8#else
[a3aa1e1]9 text PT_LOAD FLAGS(5);
[c53d906]10#endif
[a3aa1e1]11 data PT_LOAD FLAGS(6);
[1e00216]12 debug PT_NOTE;
[d03e156]13}
14
[1a030b8]15SECTIONS {
[c53d906]16#ifdef LOADER
[e1c0260]17 . = 0x70001000 + SIZEOF_HEADERS;
18
[c53d906]19 .interp : {
20 *(.interp);
[e1c0260]21 } :interp :text
[c53d906]22#else
23 . = 0x1000 + SIZEOF_HEADERS;
24#endif
[e1c0260]25
[9bcdbc5]26 /* Make sure the code is aligned reasonably */
27 . = ALIGN(., 16);
28
[1cc2974]29 .init : {
[a3aa1e1]30 *(.init);
31 } :text
[1e00216]32
[a3aa1e1]33 .text : {
[d21e72db]34 *(.text .text.*);
35 *(.rodata .rodata.*);
[a3aa1e1]36 } :text
[1e00216]37
[1cc2974]38 . = . + 0x1000;
[1e00216]39
[1cc2974]40 .data : {
[a3aa1e1]41 *(.data);
42 } :data
[1e00216]43
[c4c5de5]44 .tdata : {
45 _tdata_start = .;
46 *(.tdata);
47 _tdata_end = .;
48 _tbss_start = .;
49 *(.tbss);
50 _tbss_end = .;
51 } :data
[1e00216]52
[e622f0a8]53 _tls_alignment = ALIGNOF(.tdata);
[1e00216]54
[a3aa1e1]55 .bss : {
56 *(COMMON);
57 *(.bss);
58 } :data
[1e00216]59
60#ifdef CONFIG_LINE_DEBUG
61 .comment 0 : { *(.comment); } :debug
62 .debug_abbrev 0 : { *(.debug_abbrev); } :debug
63 .debug_aranges 0 : { *(.debug_aranges); } :debug
64 .debug_info 0 : { *(.debug_info); } :debug
65 .debug_line 0 : { *(.debug_line); } :debug
66 .debug_loc 0 : { *(.debug_loc); } :debug
67 .debug_pubnames 0 : { *(.debug_pubnames); } :debug
68 .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug
69 .debug_ranges 0 : { *(.debug_ranges); } :debug
70 .debug_str 0 : { *(.debug_str); } :debug
71#endif
72
[d03e156]73 /DISCARD/ : {
[a3aa1e1]74 *(*);
[d03e156]75 }
[1a030b8]76}
Note: See TracBrowser for help on using the repository browser.