Changeset da13982 in mainline
- Timestamp:
- 2023-10-26T15:20:07Z (14 months ago)
- Branches:
- master, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2fbb42f
- Parents:
- d28bdbe
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-26 14:42:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-26 15:20:07)
- Files:
-
- 2 added
- 1 deleted
- 21 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/_link.ld.in
rd28bdbe rda13982 12 12 *(COMMON); /* global variables */ 13 13 14 *(.rodata*); 14 *(.rodata .rodata.*); 15 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 16 *(.eh_frame_hdr .eh_frame_hdr.*); 15 17 *(.sdata); 16 18 *(.reginfo); 17 . = ALIGN(8);18 symbol_table = .;19 *(symtab.*);20 19 } 21 20 .sbss : { … … 26 25 kdata_end = .; 27 26 27 .comment 0 : { *(.comment); } 28 .debug_abbrev 0 : { *(.debug_abbrev); } 29 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 30 .debug_addr 0 : { *(.debug_addr); } 31 .debug_aranges 0 : { *(.debug_aranges); } 32 .debug_cu_index 0 : { *(.debug_cu_index); } 33 .debug_frame 0 : { *(.debug_frame); } 34 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 35 .debug_info 0 : { *(.debug_info); } 36 .debug_info.dwo 0 : { *(.debug_info.dwo); } 37 .debug_line 0 : { *(.debug_line); } 38 .debug_line.dwo 0 : { *(.debug_line.dwo); } 39 .debug_line_str 0 : { *(.debug_line_str); } 40 .debug_loc 0 : { *(.debug_loc); } 41 .debug_loclists 0 : { *(.debug_loclists); } 42 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 43 .debug_macinfo 0 : { *(.debug_macinfo); } 44 .debug_macro 0 : { *(.debug_macro); } 45 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 46 .debug_names 0 : { *(.debug_names); } 47 .debug_pubnames 0 : { *(.debug_pubnames); } 48 .debug_pubtypes 0 : { *(.debug_pubtypes); } 49 .debug_ranges 0 : { *(.debug_ranges); } 50 .debug_rnglists 0 : { *(.debug_rnglists); } 51 .debug_str 0 : { *(.debug_str); } 52 .debug_str.dwo 0 : { *(.debug_str.dwo); } 53 .debug_str_offsets 0 : { *(.debug_str_offsets); } 54 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 55 .debug_tu_index 0 : { *(.debug_tu_index); } 56 .debug_types 0 : { *(.debug_types); } 57 28 58 /DISCARD/ : { 29 59 *(.mdebug*); -
kernel/arch/amd64/_link.ld.in
rd28bdbe rda13982 30 30 kdata_start = .; 31 31 *(.data); /* initialized data */ 32 *(.rodata .rodata.*); /* string literals */ 32 *(.rodata .rodata.*); 33 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 34 *(.eh_frame_hdr .eh_frame_hdr.*); 33 35 *(COMMON); /* global variables */ 34 36 35 37 /* bss can't be omitted from the ELF image. */ 36 38 *(.bss); /* uninitialized static variables */ 37 38 . = ALIGN(8);39 symbol_table = .;40 *(symtab.*); /* Symbol table, must be LAST symbol!*/41 42 39 kdata_end = .; 43 40 } 44 41 45 #ifdef CONFIG_LINE_DEBUG46 42 .comment 0 : { *(.comment); } 47 43 .debug_abbrev 0 : { *(.debug_abbrev); } 44 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 45 .debug_addr 0 : { *(.debug_addr); } 48 46 .debug_aranges 0 : { *(.debug_aranges); } 47 .debug_cu_index 0 : { *(.debug_cu_index); } 48 .debug_frame 0 : { *(.debug_frame); } 49 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 49 50 .debug_info 0 : { *(.debug_info); } 51 .debug_info.dwo 0 : { *(.debug_info.dwo); } 50 52 .debug_line 0 : { *(.debug_line); } 53 .debug_line.dwo 0 : { *(.debug_line.dwo); } 54 .debug_line_str 0 : { *(.debug_line_str); } 51 55 .debug_loc 0 : { *(.debug_loc); } 56 .debug_loclists 0 : { *(.debug_loclists); } 57 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 58 .debug_macinfo 0 : { *(.debug_macinfo); } 59 .debug_macro 0 : { *(.debug_macro); } 60 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 61 .debug_names 0 : { *(.debug_names); } 52 62 .debug_pubnames 0 : { *(.debug_pubnames); } 53 63 .debug_pubtypes 0 : { *(.debug_pubtypes); } 54 64 .debug_ranges 0 : { *(.debug_ranges); } 65 .debug_rnglists 0 : { *(.debug_rnglists); } 55 66 .debug_str 0 : { *(.debug_str); } 56 #endif 67 .debug_str.dwo 0 : { *(.debug_str.dwo); } 68 .debug_str_offsets 0 : { *(.debug_str_offsets); } 69 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 70 .debug_tu_index 0 : { *(.debug_tu_index); } 71 .debug_types 0 : { *(.debug_types); } 57 72 58 73 /DISCARD/ : { -
kernel/arch/arm32/_link.ld.in
rd28bdbe rda13982 37 37 *(COMMON); /* global variables */ 38 38 39 *(.rodata*); 39 *(.rodata .rodata.*); 40 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 41 *(.eh_frame_hdr .eh_frame_hdr.*); 40 42 *(.sdata); 41 43 *(.reginfo); 42 . = ALIGN(8);43 symbol_table = .;44 *(symtab.*);45 44 } 46 45 .sbss : { … … 51 50 kdata_end = .; 52 51 52 .comment 0 : { *(.comment); } 53 .debug_abbrev 0 : { *(.debug_abbrev); } 54 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 55 .debug_addr 0 : { *(.debug_addr); } 56 .debug_aranges 0 : { *(.debug_aranges); } 57 .debug_cu_index 0 : { *(.debug_cu_index); } 58 .debug_frame 0 : { *(.debug_frame); } 59 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 60 .debug_info 0 : { *(.debug_info); } 61 .debug_info.dwo 0 : { *(.debug_info.dwo); } 62 .debug_line 0 : { *(.debug_line); } 63 .debug_line.dwo 0 : { *(.debug_line.dwo); } 64 .debug_line_str 0 : { *(.debug_line_str); } 65 .debug_loc 0 : { *(.debug_loc); } 66 .debug_loclists 0 : { *(.debug_loclists); } 67 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 68 .debug_macinfo 0 : { *(.debug_macinfo); } 69 .debug_macro 0 : { *(.debug_macro); } 70 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 71 .debug_names 0 : { *(.debug_names); } 72 .debug_pubnames 0 : { *(.debug_pubnames); } 73 .debug_pubtypes 0 : { *(.debug_pubtypes); } 74 .debug_ranges 0 : { *(.debug_ranges); } 75 .debug_rnglists 0 : { *(.debug_rnglists); } 76 .debug_str 0 : { *(.debug_str); } 77 .debug_str.dwo 0 : { *(.debug_str.dwo); } 78 .debug_str_offsets 0 : { *(.debug_str_offsets); } 79 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 80 .debug_tu_index 0 : { *(.debug_tu_index); } 81 .debug_types 0 : { *(.debug_types); } 82 53 83 /DISCARD/ : { 54 84 *(.mdebug*); -
kernel/arch/arm64/_link.ld.in
rd28bdbe rda13982 32 32 *(COMMON); /* global variables */ 33 33 34 *(.rodata*); 35 . = ALIGN(8); 36 symbol_table = .; 37 *(symtab.*); 34 *(.rodata .rodata.*); 35 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 36 *(.eh_frame_hdr .eh_frame_hdr.*); 38 37 39 38 kdata_end = .; 40 39 } 41 40 42 #ifdef CONFIG_LINE_DEBUG43 41 .comment 0 : { *(.comment); } 44 42 .debug_abbrev 0 : { *(.debug_abbrev); } 43 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 44 .debug_addr 0 : { *(.debug_addr); } 45 45 .debug_aranges 0 : { *(.debug_aranges); } 46 .debug_cu_index 0 : { *(.debug_cu_index); } 46 47 .debug_frame 0 : { *(.debug_frame); } 48 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 47 49 .debug_info 0 : { *(.debug_info); } 50 .debug_info.dwo 0 : { *(.debug_info.dwo); } 48 51 .debug_line 0 : { *(.debug_line); } 52 .debug_line.dwo 0 : { *(.debug_line.dwo); } 53 .debug_line_str 0 : { *(.debug_line_str); } 49 54 .debug_loc 0 : { *(.debug_loc); } 55 .debug_loclists 0 : { *(.debug_loclists); } 56 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 50 57 .debug_macinfo 0 : { *(.debug_macinfo); } 58 .debug_macro 0 : { *(.debug_macro); } 59 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 60 .debug_names 0 : { *(.debug_names); } 51 61 .debug_pubnames 0 : { *(.debug_pubnames); } 52 62 .debug_pubtypes 0 : { *(.debug_pubtypes); } 53 63 .debug_ranges 0 : { *(.debug_ranges); } 64 .debug_rnglists 0 : { *(.debug_rnglists); } 54 65 .debug_str 0 : { *(.debug_str); } 55 #endif 66 .debug_str.dwo 0 : { *(.debug_str.dwo); } 67 .debug_str_offsets 0 : { *(.debug_str_offsets); } 68 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 69 .debug_tu_index 0 : { *(.debug_tu_index); } 70 .debug_types 0 : { *(.debug_types); } 56 71 57 72 /DISCARD/ : { -
kernel/arch/ia32/_link.ld.in
rd28bdbe rda13982 29 29 kdata_start = .; 30 30 *(.data); /* initialized data */ 31 *(.rodata .rodata.*); /* string literals */ 31 *(.rodata .rodata.*); 32 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 33 *(.eh_frame_hdr .eh_frame_hdr.*); 32 34 *(COMMON); /* global variables */ 33 35 34 36 /* bss can't be omitted from the ELF image. */ 35 37 *(.bss); /* uninitialized static variables */ 36 37 . = ALIGN(8);38 symbol_table = .;39 *(symtab.*); /* Symbol table, must be LAST symbol! */40 38 kdata_end = .; 41 39 } 42 40 43 #ifdef CONFIG_LINE_DEBUG44 41 .comment 0 : { *(.comment); } 45 42 .debug_abbrev 0 : { *(.debug_abbrev); } 43 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 44 .debug_addr 0 : { *(.debug_addr); } 46 45 .debug_aranges 0 : { *(.debug_aranges); } 46 .debug_cu_index 0 : { *(.debug_cu_index); } 47 .debug_frame 0 : { *(.debug_frame); } 48 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 47 49 .debug_info 0 : { *(.debug_info); } 50 .debug_info.dwo 0 : { *(.debug_info.dwo); } 48 51 .debug_line 0 : { *(.debug_line); } 52 .debug_line.dwo 0 : { *(.debug_line.dwo); } 53 .debug_line_str 0 : { *(.debug_line_str); } 49 54 .debug_loc 0 : { *(.debug_loc); } 55 .debug_loclists 0 : { *(.debug_loclists); } 56 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 57 .debug_macinfo 0 : { *(.debug_macinfo); } 58 .debug_macro 0 : { *(.debug_macro); } 59 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 60 .debug_names 0 : { *(.debug_names); } 50 61 .debug_pubnames 0 : { *(.debug_pubnames); } 51 62 .debug_pubtypes 0 : { *(.debug_pubtypes); } 52 63 .debug_ranges 0 : { *(.debug_ranges); } 64 .debug_rnglists 0 : { *(.debug_rnglists); } 53 65 .debug_str 0 : { *(.debug_str); } 54 #endif 66 .debug_str.dwo 0 : { *(.debug_str.dwo); } 67 .debug_str_offsets 0 : { *(.debug_str_offsets); } 68 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 69 .debug_tu_index 0 : { *(.debug_tu_index); } 70 .debug_types 0 : { *(.debug_types); } 55 71 56 72 /DISCARD/ : { -
kernel/arch/ia64/_link.ld.in
rd28bdbe rda13982 24 24 kdata_start = .; 25 25 *(K_DATA_START) 26 *(.rodata .rodata.*) 26 *(.rodata .rodata.*); 27 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 28 *(.eh_frame_hdr .eh_frame_hdr.*); 27 29 *(.opd) 28 30 *(.data .data.*) … … 34 36 *(.bss) 35 37 *(COMMON); 36 37 . = ALIGN(8);38 symbol_table = .;39 *(symtab.*); /* Symbol table, must be LAST symbol!*/40 41 38 kdata_end = .; 42 39 } 40 41 .comment 0 : { *(.comment); } 42 .debug_abbrev 0 : { *(.debug_abbrev); } 43 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 44 .debug_addr 0 : { *(.debug_addr); } 45 .debug_aranges 0 : { *(.debug_aranges); } 46 .debug_cu_index 0 : { *(.debug_cu_index); } 47 .debug_frame 0 : { *(.debug_frame); } 48 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 49 .debug_info 0 : { *(.debug_info); } 50 .debug_info.dwo 0 : { *(.debug_info.dwo); } 51 .debug_line 0 : { *(.debug_line); } 52 .debug_line.dwo 0 : { *(.debug_line.dwo); } 53 .debug_line_str 0 : { *(.debug_line_str); } 54 .debug_loc 0 : { *(.debug_loc); } 55 .debug_loclists 0 : { *(.debug_loclists); } 56 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 57 .debug_macinfo 0 : { *(.debug_macinfo); } 58 .debug_macro 0 : { *(.debug_macro); } 59 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 60 .debug_names 0 : { *(.debug_names); } 61 .debug_pubnames 0 : { *(.debug_pubnames); } 62 .debug_pubtypes 0 : { *(.debug_pubtypes); } 63 .debug_ranges 0 : { *(.debug_ranges); } 64 .debug_rnglists 0 : { *(.debug_rnglists); } 65 .debug_str 0 : { *(.debug_str); } 66 .debug_str.dwo 0 : { *(.debug_str.dwo); } 67 .debug_str_offsets 0 : { *(.debug_str_offsets); } 68 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 69 .debug_tu_index 0 : { *(.debug_tu_index); } 70 .debug_types 0 : { *(.debug_types); } 43 71 44 72 /DISCARD/ : { -
kernel/arch/mips32/_link.ld.in
rd28bdbe rda13982 34 34 kdata_start = .; 35 35 *(.data); /* initialized data */ 36 *(.rodata*); 36 *(.rodata .rodata.*); 37 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 38 *(.eh_frame_hdr .eh_frame_hdr.*); 37 39 *(.sdata); 38 40 *(.reginfo); … … 41 43 *(.bss); /* uninitialized static variables */ 42 44 *(COMMON); /* global variables */ 43 . = ALIGN(8);44 symbol_table = .;45 *(symtab.*);46 45 } 47 46 _gp = . + 0x8000; … … 50 49 51 50 kdata_end = .; 51 52 .comment 0 : { *(.comment); } 53 .debug_abbrev 0 : { *(.debug_abbrev); } 54 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 55 .debug_addr 0 : { *(.debug_addr); } 56 .debug_aranges 0 : { *(.debug_aranges); } 57 .debug_cu_index 0 : { *(.debug_cu_index); } 58 .debug_frame 0 : { *(.debug_frame); } 59 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 60 .debug_info 0 : { *(.debug_info); } 61 .debug_info.dwo 0 : { *(.debug_info.dwo); } 62 .debug_line 0 : { *(.debug_line); } 63 .debug_line.dwo 0 : { *(.debug_line.dwo); } 64 .debug_line_str 0 : { *(.debug_line_str); } 65 .debug_loc 0 : { *(.debug_loc); } 66 .debug_loclists 0 : { *(.debug_loclists); } 67 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 68 .debug_macinfo 0 : { *(.debug_macinfo); } 69 .debug_macro 0 : { *(.debug_macro); } 70 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 71 .debug_names 0 : { *(.debug_names); } 72 .debug_pubnames 0 : { *(.debug_pubnames); } 73 .debug_pubtypes 0 : { *(.debug_pubtypes); } 74 .debug_ranges 0 : { *(.debug_ranges); } 75 .debug_rnglists 0 : { *(.debug_rnglists); } 76 .debug_str 0 : { *(.debug_str); } 77 .debug_str.dwo 0 : { *(.debug_str.dwo); } 78 .debug_str_offsets 0 : { *(.debug_str_offsets); } 79 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 80 .debug_tu_index 0 : { *(.debug_tu_index); } 81 .debug_types 0 : { *(.debug_types); } 52 82 53 83 /DISCARD/ : { -
kernel/arch/ppc32/_link.ld.in
rd28bdbe rda13982 34 34 *(K_DATA_START); 35 35 *(.rodata .rodata.*); 36 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 37 *(.eh_frame_hdr .eh_frame_hdr.*); 36 38 *(.data); /* initialized data */ 37 39 *(.sdata); … … 40 42 *(.bss); /* uninitialized static variables */ 41 43 *(COMMON); /* global variables */ 42 43 . = ALIGN(8);44 symbol_table = .;45 *(symtab.*); /* Symbol table, must be LAST symbol!*/46 47 44 kdata_end = .; 48 45 } 46 47 .comment 0 : { *(.comment); } 48 .debug_abbrev 0 : { *(.debug_abbrev); } 49 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 50 .debug_addr 0 : { *(.debug_addr); } 51 .debug_aranges 0 : { *(.debug_aranges); } 52 .debug_cu_index 0 : { *(.debug_cu_index); } 53 .debug_frame 0 : { *(.debug_frame); } 54 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 55 .debug_info 0 : { *(.debug_info); } 56 .debug_info.dwo 0 : { *(.debug_info.dwo); } 57 .debug_line 0 : { *(.debug_line); } 58 .debug_line.dwo 0 : { *(.debug_line.dwo); } 59 .debug_line_str 0 : { *(.debug_line_str); } 60 .debug_loc 0 : { *(.debug_loc); } 61 .debug_loclists 0 : { *(.debug_loclists); } 62 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 63 .debug_macinfo 0 : { *(.debug_macinfo); } 64 .debug_macro 0 : { *(.debug_macro); } 65 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 66 .debug_names 0 : { *(.debug_names); } 67 .debug_pubnames 0 : { *(.debug_pubnames); } 68 .debug_pubtypes 0 : { *(.debug_pubtypes); } 69 .debug_ranges 0 : { *(.debug_ranges); } 70 .debug_rnglists 0 : { *(.debug_rnglists); } 71 .debug_str 0 : { *(.debug_str); } 72 .debug_str.dwo 0 : { *(.debug_str.dwo); } 73 .debug_str_offsets 0 : { *(.debug_str_offsets); } 74 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 75 .debug_tu_index 0 : { *(.debug_tu_index); } 76 .debug_types 0 : { *(.debug_types); } 49 77 50 78 /DISCARD/ : { -
kernel/arch/riscv64/_link.ld.in
rd28bdbe rda13982 24 24 kdata_start = .; 25 25 *(.data); /* initialized data */ 26 *(.rodata*); 26 *(.rodata .rodata.*); 27 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 28 *(.eh_frame_hdr .eh_frame_hdr.*); 27 29 *(.sdata); 28 30 *(.reginfo); … … 31 33 *(.bss); /* uninitialized static variables */ 32 34 *(COMMON); /* global variables */ 33 . = ALIGN(8);34 symbol_table = .;35 *(symtab.*);36 35 kdata_end = .; 37 36 } 37 38 .comment 0 : { *(.comment); } 39 .debug_abbrev 0 : { *(.debug_abbrev); } 40 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 41 .debug_addr 0 : { *(.debug_addr); } 42 .debug_aranges 0 : { *(.debug_aranges); } 43 .debug_cu_index 0 : { *(.debug_cu_index); } 44 .debug_frame 0 : { *(.debug_frame); } 45 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 46 .debug_info 0 : { *(.debug_info); } 47 .debug_info.dwo 0 : { *(.debug_info.dwo); } 48 .debug_line 0 : { *(.debug_line); } 49 .debug_line.dwo 0 : { *(.debug_line.dwo); } 50 .debug_line_str 0 : { *(.debug_line_str); } 51 .debug_loc 0 : { *(.debug_loc); } 52 .debug_loclists 0 : { *(.debug_loclists); } 53 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 54 .debug_macinfo 0 : { *(.debug_macinfo); } 55 .debug_macro 0 : { *(.debug_macro); } 56 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 57 .debug_names 0 : { *(.debug_names); } 58 .debug_pubnames 0 : { *(.debug_pubnames); } 59 .debug_pubtypes 0 : { *(.debug_pubtypes); } 60 .debug_ranges 0 : { *(.debug_ranges); } 61 .debug_rnglists 0 : { *(.debug_rnglists); } 62 .debug_str 0 : { *(.debug_str); } 63 .debug_str.dwo 0 : { *(.debug_str.dwo); } 64 .debug_str_offsets 0 : { *(.debug_str_offsets); } 65 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 66 .debug_tu_index 0 : { *(.debug_tu_index); } 67 .debug_types 0 : { *(.debug_types); } 38 68 39 69 /DISCARD/ : { -
kernel/arch/sparc64/_link.ld.in
rd28bdbe rda13982 23 23 *(K_DATA_START) 24 24 *(.rodata .rodata.*); 25 *(.eh_frame .eh_frame.*); /* stack unwinding data */ 26 *(.eh_frame_hdr .eh_frame_hdr.*); 25 27 *(.data); /* initialized data */ 26 28 *(.sdata); … … 30 32 *(.bss); /* uninitialized static variables */ 31 33 *(COMMON); /* global variables */ 32 33 . = ALIGN(8);34 symbol_table = .;35 *(symtab.*); /* Symbol table, must be LAST symbol!*/36 37 34 kdata_end = .; 38 35 } 36 37 .comment 0 : { *(.comment); } 38 .debug_abbrev 0 : { *(.debug_abbrev); } 39 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); } 40 .debug_addr 0 : { *(.debug_addr); } 41 .debug_aranges 0 : { *(.debug_aranges); } 42 .debug_cu_index 0 : { *(.debug_cu_index); } 43 .debug_frame 0 : { *(.debug_frame); } 44 .debug_frame_hdr 0 : { *(.debug_frame_hdr); } 45 .debug_info 0 : { *(.debug_info); } 46 .debug_info.dwo 0 : { *(.debug_info.dwo); } 47 .debug_line 0 : { *(.debug_line); } 48 .debug_line.dwo 0 : { *(.debug_line.dwo); } 49 .debug_line_str 0 : { *(.debug_line_str); } 50 .debug_loc 0 : { *(.debug_loc); } 51 .debug_loclists 0 : { *(.debug_loclists); } 52 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); } 53 .debug_macinfo 0 : { *(.debug_macinfo); } 54 .debug_macro 0 : { *(.debug_macro); } 55 .debug_macro.dwo 0 : { *(.debug_macro.dwo); } 56 .debug_names 0 : { *(.debug_names); } 57 .debug_pubnames 0 : { *(.debug_pubnames); } 58 .debug_pubtypes 0 : { *(.debug_pubtypes); } 59 .debug_ranges 0 : { *(.debug_ranges); } 60 .debug_rnglists 0 : { *(.debug_rnglists); } 61 .debug_str 0 : { *(.debug_str); } 62 .debug_str.dwo 0 : { *(.debug_str.dwo); } 63 .debug_str_offsets 0 : { *(.debug_str_offsets); } 64 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); } 65 .debug_tu_index 0 : { *(.debug_tu_index); } 66 .debug_types 0 : { *(.debug_types); } 39 67 40 68 /DISCARD/ : { -
kernel/generic/include/debug.h
rd28bdbe rda13982 37 37 38 38 #include <log.h> 39 #include <symtab_lookup.h>40 39 #include <printf/verify.h> 41 40 … … 43 42 44 43 /* An empty printf function to ensure syntactic correctness of disabled debug prints. */ 45 _HELENOS_PRINTF_ATTRIBUTE(1, 2) 44 static inline void dummy_printf(const char *fmt, ...) _HELENOS_PRINTF_ATTRIBUTE(1, 2); 46 45 static inline void dummy_printf(const char *fmt, ...) 47 46 { -
kernel/generic/include/debug/register.h
rd28bdbe rda13982 1 1 /* 2 * Copyright (c) 20 05 Ondrej Palkovsky2 * Copyright (c) 2023 Jiří Zárevúcky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup kernel_generic 30 * @{ 31 */ 32 /** @file 33 */ 29 #ifndef DEBUG_REGISTER_H_ 30 #define DEBUG_REGISTER_H_ 34 31 35 #ifndef KERN_SYMTAB_LOOKUP_H_ 36 #define KERN_SYMTAB_LOOKUP_H_ 32 /** Accepts data of an ELF file containing debug sections. */ 33 void register_debug_data(const void *data, size_t data_size); 37 34 38 #include <typedefs.h> 39 40 #define MAX_SYMBOL_NAME 64 41 42 struct symtab_entry { 43 uint64_t address_le; 44 char symbol_name[MAX_SYMBOL_NAME]; 45 }; 46 47 extern errno_t symtab_name_lookup(uintptr_t, const char **, uintptr_t *); 48 extern const char *symtab_fmt_name_lookup(uintptr_t); 49 extern errno_t symtab_addr_lookup(const char *, uintptr_t *); 50 51 #ifdef CONFIG_SYMTAB 52 53 /** Symtable linked together by build process 54 * 55 */ 56 extern struct symtab_entry symbol_table[]; 57 58 #endif /* CONFIG_SYMTAB */ 59 60 #endif 61 62 /** @} 63 */ 35 #endif /* DEBUG_REGISTER_H_ */ -
kernel/generic/include/symtab.h
rd28bdbe rda13982 36 36 #define KERN_SYMTAB_H_ 37 37 38 #include <symtab_lookup.h> 39 #include <console/chardev.h> 38 #include <typedefs.h> 40 39 41 40 extern void symtab_print_search(const char *); 42 41 extern const char *symtab_hints_enum(const char *, const char **, void **); 42 extern const char *symtab_fmt_name_lookup(uintptr_t); 43 extern errno_t symtab_addr_lookup(const char *, uintptr_t *); 44 extern const char *symtab_name_lookup(uintptr_t, uintptr_t *); 43 45 44 46 #endif -
kernel/generic/meson.build
rd28bdbe rda13982 46 46 'src/cpu/cpu_mask.c', 47 47 'src/ddi/irq.c', 48 'src/debug/debug.c',49 48 'src/debug/panic.c', 49 'src/debug/profile.c', 50 'src/debug/sections.c', 50 51 'src/debug/stacktrace.c', 51 52 'src/debug/symtab.c', -
kernel/generic/src/console/kconsole.c
rd28bdbe rda13982 85 85 SPINLOCK_INITIALIZE(cmd_lock); /**< Lock protecting command list. */ 86 86 LIST_INITIALIZE(cmd_list); /**< Command list. */ 87 88 #define MAX_SYMBOL_NAME 64 87 89 88 90 static char32_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = { }; -
kernel/generic/src/debug/stacktrace.c
rd28bdbe rda13982 106 106 kernel_symbol_resolve(uintptr_t addr, const char **sp, uintptr_t *op) 107 107 { 108 return (symtab_name_lookup(addr, sp, op) == 0); 108 uintptr_t symbol_addr = 0; 109 *sp = symtab_name_lookup(addr, &symbol_addr); 110 *op = addr - symbol_addr; 111 return symbol_addr != 0; 109 112 } 110 113 -
kernel/generic/src/debug/symtab.c
rd28bdbe rda13982 44 44 #include <console/prompt.h> 45 45 46 /** Get name of a symbol that seems most likely to correspond to address. 47 * 48 * @param addr Address. 49 * @param name Place to store pointer to the symbol name. 50 * @param offset Place to store offset from the symbol address. 51 * 52 * @return Zero on success or an error code, ENOENT if not found, 53 * ENOTSUP if symbol table not available. 54 * 55 */ 56 errno_t symtab_name_lookup(uintptr_t addr, const char **name, uintptr_t *offset) 57 { 58 #ifdef CONFIG_SYMTAB 59 size_t i; 60 61 for (i = 1; symbol_table[i].address_le; i++) { 62 if (addr < uint64_t_le2host(symbol_table[i].address_le)) 46 #include <abi/elf.h> 47 #include <debug/sections.h> 48 49 static inline size_t symtab_len() 50 { 51 return symtab_size / sizeof(elf_symbol_t); 52 } 53 54 static inline const char *symtab_entry_name(int entry) 55 { 56 size_t index = symtab[entry].st_name; 57 58 if (index >= strtab_size) 59 return NULL; 60 61 return strtab + index; 62 } 63 64 static inline size_t symtab_next(size_t i) 65 { 66 for (; i < symtab_len(); i++) { 67 const char *name = symtab_entry_name(i); 68 int st_bind = elf_st_bind(symtab[i].st_info); 69 int st_type = elf_st_type(symtab[i].st_info); 70 71 if (st_bind == STB_LOCAL) 72 continue; 73 74 if (name == NULL || *name == '\0') 75 continue; 76 77 if (st_type == STT_FUNC || st_type == STT_OBJECT) 63 78 break; 64 79 } 65 80 66 if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le)) { 67 *name = symbol_table[i - 1].symbol_name; 68 if (offset) 69 *offset = addr - 70 uint64_t_le2host(symbol_table[i - 1].address_le); 71 return EOK; 72 } 73 74 *name = NULL; 75 return ENOENT; 76 77 #else 78 *name = NULL; 79 return ENOTSUP; 80 #endif 81 return i; 82 } 83 84 const char *symtab_name_lookup(uintptr_t addr, uintptr_t *symbol_addr) 85 { 86 if (symtab == NULL || strtab == NULL) 87 return NULL; 88 89 uintptr_t closest_symbol_addr = 0; 90 uintptr_t closest_symbol_name = 0; 91 92 for (size_t i = symtab_next(0); i < symtab_len(); i = symtab_next(i + 1)) { 93 if (symtab[i].st_value > addr) 94 continue; 95 96 if (symtab[i].st_value + symtab[i].st_size > addr) { 97 closest_symbol_addr = symtab[i].st_value; 98 closest_symbol_name = symtab[i].st_name; 99 break; 100 } 101 102 if (symtab[i].st_value > closest_symbol_addr) { 103 closest_symbol_addr = symtab[i].st_value; 104 closest_symbol_name = symtab[i].st_name; 105 } 106 } 107 108 if (closest_symbol_addr == 0) 109 return NULL; 110 111 if (symbol_addr) 112 *symbol_addr = closest_symbol_addr; 113 114 if (closest_symbol_name >= strtab_size) 115 return NULL; 116 117 return strtab + closest_symbol_name; 81 118 } 82 119 … … 95 132 const char *symtab_fmt_name_lookup(uintptr_t addr) 96 133 { 97 const char *name; 98 errno_t rc = symtab_name_lookup(addr, &name, NULL); 99 100 switch (rc) { 101 case EOK: 102 return name; 103 case ENOENT: 104 return "unknown"; 105 default: 106 return "N/A"; 107 } 108 } 109 110 #ifdef CONFIG_SYMTAB 111 112 /** Find symbols that match the parameter forward and print them. 113 * 114 * @param name Search string 115 * @param startpos Starting position, changes to found position 116 * 117 * @return Pointer to the part of string that should be completed or NULL. 118 * 119 */ 120 static const char *symtab_search_one(const char *name, size_t *startpos) 121 { 122 size_t namelen = str_length(name); 123 124 size_t pos; 125 for (pos = *startpos; symbol_table[pos].address_le; pos++) { 126 const char *curname = symbol_table[pos].symbol_name; 127 128 /* Find a ':' in curname */ 129 const char *colon = str_chr(curname, ':'); 130 if (colon == NULL) 131 continue; 132 133 if (str_length(curname) < namelen) 134 continue; 135 136 if (str_lcmp(name, curname, namelen) == 0) { 137 *startpos = pos; 138 return (curname + str_lsize(curname, namelen)); 139 } 140 } 141 142 return NULL; 143 } 144 145 #endif 134 const char *name = symtab_name_lookup(addr, NULL); 135 if (name == NULL) 136 name = "<unknown>"; 137 return name; 138 } 146 139 147 140 /** Return address that corresponds to the entry. … … 152 145 * @param addr Place to store symbol address 153 146 * 154 * @return Zero on success, ENOENT - not found, EOVERFLOW - duplicate 155 * symbol, ENOTSUP - no symbol information available. 147 * @return Zero on success, ENOENT - not found 156 148 * 157 149 */ 158 150 errno_t symtab_addr_lookup(const char *name, uintptr_t *addr) 159 151 { 160 #ifdef CONFIG_SYMTAB 161 size_t found = 0; 162 size_t pos = 0; 163 const char *hint; 164 165 while ((hint = symtab_search_one(name, &pos))) { 166 if (str_length(hint) == 0) { 167 *addr = uint64_t_le2host(symbol_table[pos].address_le); 168 found++; 169 } 170 pos++; 171 } 172 173 if (found > 1) 174 return EOVERFLOW; 175 176 if (found < 1) 177 return ENOENT; 178 179 return EOK; 180 181 #else 182 return ENOTSUP; 183 #endif 152 for (size_t i = symtab_next(0); i < symtab_len(); i = symtab_next(i + 1)) { 153 if (str_cmp(name, symtab_entry_name(i)) == 0) { 154 *addr = symtab[i].st_value; 155 return EOK; 156 } 157 } 158 159 return ENOENT; 184 160 } 185 161 … … 187 163 void symtab_print_search(const char *name) 188 164 { 189 #ifdef CONFIG_SYMTAB 190 size_t pos = 0; 191 while (symtab_search_one(name, &pos)) { 192 uintptr_t addr = uint64_t_le2host(symbol_table[pos].address_le); 193 char *realname = symbol_table[pos].symbol_name; 194 printf("%p: %s\n", (void *) addr, realname); 195 pos++; 196 } 197 198 #else 199 printf("No symbol information available.\n"); 200 #endif 165 if (symtab == NULL || strtab == NULL) { 166 printf("No symbol information available.\n"); 167 return; 168 } 169 170 size_t namelen = str_length(name); 171 172 for (size_t i = symtab_next(0); i < symtab_len(); i = symtab_next(i + 1)) { 173 const char *n = symtab_entry_name(i); 174 175 if (str_lcmp(name, n, namelen) == 0) { 176 printf("%p: %s\n", (void *) symtab[i].st_value, n); 177 } 178 } 201 179 } 202 180 203 181 /** Symtab completion enum, see kernel/generic/include/kconsole.h */ 204 const char *symtab_hints_enum(const char *input, const char **help, 205 void **ctx) 206 { 207 #ifdef CONFIG_SYMTAB 182 const char *symtab_hints_enum(const char *input, const char **help, void **ctx) 183 { 184 if (symtab == NULL || strtab == NULL) 185 return NULL; 186 187 if (help) 188 *help = NULL; 189 208 190 size_t len = str_length(input); 209 struct symtab_entry **entry = (struct symtab_entry **)ctx; 210 211 if (*entry == NULL) 212 *entry = symbol_table; 213 214 for (; (*entry)->address_le; (*entry)++) { 215 const char *curname = (*entry)->symbol_name; 216 217 /* Find a ':' in curname */ 218 const char *colon = str_chr(curname, ':'); 219 if (colon == NULL) 220 continue; 221 222 if (str_length(curname) < len) 223 continue; 191 for (size_t i = symtab_next((size_t) *ctx); i < symtab_len(); i = symtab_next(i + 1)) { 192 const char *curname = symtab_entry_name(i); 224 193 225 194 if (str_lcmp(input, curname, len) == 0) { 226 (*entry)++; 227 if (help) 228 *help = NULL; 195 *ctx = (void *) (i + 1); 229 196 return (curname + str_lsize(curname, len)); 230 197 } … … 232 199 233 200 return NULL; 234 235 #else236 return NULL;237 #endif238 201 } 239 202 -
kernel/generic/src/main/kinit.c
rd28bdbe rda13982 73 73 #include <align.h> 74 74 #include <stdlib.h> 75 #include <debug/register.h> 75 76 76 77 #ifdef CONFIG_SMP … … 182 183 */ 183 184 size_t i; 184 program_t programs[CONFIG_INIT_TASKS] ;185 program_t programs[CONFIG_INIT_TASKS] = { }; 185 186 186 187 // FIXME: do not propagate arguments through sysinfo … … 237 238 PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE); 238 239 assert(page); 240 241 if (str_cmp(name, "kernel.dbg") == 0) { 242 /* 243 * Not an actual init task, but rather debug sections extracted 244 * from the kernel ELF file and handed to us here so we can use 245 * it for debugging. 246 */ 247 248 register_debug_data((void *) page, init.tasks[i].size); 249 programs[i].task = NULL; 250 continue; 251 } 239 252 240 253 if (str_cmp(name, "loader") == 0) { -
kernel/meson.build
rd28bdbe rda13982 41 41 # Defines test_src 42 42 subdir('test') 43 44 ## Cross-platform assembly to start a symtab.data section45 #46 symtab_section = '.section symtab.data, "a", ' + atsign + 'progbits;'47 43 48 44 kernel_include_dirs = include_directories( … … 97 93 endif 98 94 99 if CONFIG_STRIP_BINARIES100 # TODO: do this after disassembling101 kernel_link_args += [ '-s' ]102 endif103 104 95 kernel_c_args = arch_kernel_c_args + kernel_defs + [ 105 96 '-ffreestanding', … … 149 140 all_kernel_objects = [ instrumentables, noninstrumentables ] 150 141 151 # We iterate the build several times to get symbol table right. 152 # Three times is sufficient to get correct even symbols after symtab. 142 kernel_name = 'kernel.elf' 143 kernel_map_name = kernel_name + '.map' 144 kernel_map_path = meson.current_build_dir() / kernel_map_name 145 146 kernel_elf = executable(kernel_name, 147 include_directories: kernel_include_dirs, 148 implicit_include_directories: false, 149 c_args: kernel_c_args, 150 link_args: kernel_c_args + kernel_link_args + [ 151 '-Wl,-Map,' + kernel_map_path, 152 ], 153 link_depends: kernel_ldscript, 154 link_whole: all_kernel_objects, 155 pie: false, 156 ) 157 158 kernel_dbg = custom_target('kernel.dbg', 159 output: 'kernel.dbg', 160 input: kernel_elf, 161 command: [ 162 objcopy, 163 '--only-keep-debug', 164 '@INPUT@', 165 '@OUTPUT@', 166 ], 167 ) 168 169 kernel_elf_stripped = custom_target(kernel_name + '.stripped', 170 output: kernel_name + '.stripped', 171 input: kernel_elf, 172 command: [ 173 objcopy, 174 '--strip-unneeded', 175 '@INPUT@', 176 '@OUTPUT@', 177 ], 178 ) 179 180 rd_init_binaries += [[ kernel_elf_stripped, 'boot/kernel.elf' ]] 181 install_files += [[ 'boot', kernel_elf_stripped.full_path(), 'kernel.elf' ]] 182 install_deps += [ kernel_elf_stripped ] 153 183 154 184 if CONFIG_SYMTAB 155 # Iterate build three times. 156 iterations = [ 1, 2, 3 ] 157 158 # Generates symbol table information as an object file. 159 genmap = find_program('tools/genmap.py') 160 161 # Symbol table dump needed for genmap. 162 kernel_syms = custom_target('kernel_syms.txt', 163 input: all_kernel_objects, 164 output: 'kernel_syms.txt', 165 command: [ objdump, '-t', '@INPUT@' ], 166 capture: true, 167 ) 168 else 169 # Build just once. 170 iterations = [ 1 ] 171 endif 172 173 # Empty symbol map for first iteration. 174 kernel_map_S = custom_target('empty_map.S', 175 output: 'empty_map.S', 176 capture: true, 177 command: [ 'echo', kernel_as_prolog + symtab_section ], 178 ) 179 180 foreach iter : iterations 181 is_last = (iter == iterations.length()) 182 kernel_name = 'kernel.@0@.elf'.format(iter) 183 kernel_map_name = kernel_name + '.map' 184 kernel_map_path = meson.current_build_dir() / kernel_map_name 185 186 kernel_elf = executable(kernel_name, kernel_map_S, 187 include_directories: kernel_include_dirs, 188 implicit_include_directories: false, 189 c_args: kernel_c_args, 190 link_args: kernel_c_args + kernel_link_args + [ 191 '-Wl,-Map,' + kernel_map_path, 192 ], 193 link_depends: kernel_ldscript, 194 link_whole: all_kernel_objects, 195 pie: false, 196 ) 197 198 # Generate symbol table if this is not the final iteration. 199 if not is_last 200 201 # TODO: Teach kernel to read its own ELF symbol table and get rid of this nonsense. 202 # Need to first make sure all architectures (even future ones with dumb bootloaders) can use ELF formatted kernel. 203 204 kernel_map_bin = custom_target(kernel_map_name + '.bin', 205 output: kernel_map_name + '.bin', 206 input: [ kernel_elf, kernel_syms ], 207 command: [ genmap, kernel_map_path, '@INPUT1@', '@OUTPUT@' ], 208 ) 209 210 kernel_map_S_name = kernel_name + '.map.S' 211 212 kernel_map_S = custom_target(kernel_map_S_name, 213 input: kernel_map_bin, 214 output: kernel_map_S_name, 215 capture: true, 216 command: [ 'echo', kernel_as_prolog + symtab_section + ' .incbin "@INPUT@"' ], 217 ) 218 endif 219 endforeach 220 221 rd_init_binaries += [[ kernel_elf, 'boot/kernel.elf' ]] 222 223 install_files += [[ 'boot', kernel_elf.full_path(), 'kernel.elf' ]] 224 install_deps += [ kernel_elf ] 185 rd_init_binaries += [[ kernel_dbg, 'kernel.dbg' ]] 186 install_files += [[ 'boot', kernel_dbg.full_path(), 'kernel.dbg' ]] 187 install_deps += [ kernel_dbg ] 188 endif 225 189 226 190 kernel_disasm = custom_target('kernel.elf.disasm', -
meson.build
rd28bdbe rda13982 61 61 62 62 ## Some architectures need a particular string at the beginning of assembly files. 63 if not is_variable('kernel_as_prolog')64 kernel_as_prolog = ''65 endif66 63 if not is_variable('uspace_as_prolog') 67 64 uspace_as_prolog = '' -
meson/arch/mips32/meson.build
rd28bdbe rda13982 61 61 arch_boot_link_args = [] 62 62 63 64 kernel_as_prolog = '.module softfloat;'65 63 uspace_as_prolog = '.module softfloat;.abicalls;' 66 67 64 68 65 if MACHINE == 'bmalta' or MACHINE == 'lmalta' -
meson/part/initrd_manifest/meson.build
rd28bdbe rda13982 29 29 # Init binaries. These are actually baked into the bootloader. 30 30 rd_init = [ 31 # ELF file with DWARF debug sections for kernel. 32 # Kernel detects this entry by name. 33 'kernel.dbg', 34 31 35 # IMPORTANT: The order of entries is important for bootloader! 32 36 'srv/ns',
Note:
See TracChangeset
for help on using the changeset viewer.