Changeset da13982 in mainline


Ignore:
Timestamp:
2023-10-26T15:20:07Z (7 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
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)
Message:

Read symbol table from ELF sections

Instead of the currently broken data generated using genmap.py,
read the ELF symbol table for stack traces and symbol names.
In addition to that, prepare ground for accessing DWARF debug
sections.

Because neither .symtab, nor .debug_* sections are
normally part of the program image, these have to be provided
externally. Instead of the previous way of relinking kernel
to bake in the symbol data, we now only link kernel once
and the extra debug data is loaded as part of the initrd image.

Files:
2 added
1 deleted
21 edited
2 moved

Legend:

Unmodified
Added
Removed
  • kernel/arch/abs32le/_link.ld.in

    rd28bdbe rda13982  
    1212                *(COMMON);                      /* global variables */
    1313
    14                 *(.rodata*);
     14                *(.rodata .rodata.*);
     15                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     16                *(.eh_frame_hdr .eh_frame_hdr.*);
    1517                *(.sdata);
    1618                *(.reginfo);
    17                 . = ALIGN(8);
    18                 symbol_table = .;
    19                 *(symtab.*);
    2019        }
    2120        .sbss : {
     
    2625        kdata_end = .;
    2726
     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
    2858        /DISCARD/ : {
    2959                *(.mdebug*);
  • kernel/arch/amd64/_link.ld.in

    rd28bdbe rda13982  
    3030                kdata_start = .;
    3131                *(.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.*);
    3335                *(COMMON);      /* global variables */
    3436
    3537                /* bss can't be omitted from the ELF image. */
    3638                *(.bss);        /* uninitialized static variables */
    37 
    38                 . = ALIGN(8);
    39                 symbol_table = .;
    40                 *(symtab.*);    /* Symbol table, must be LAST symbol!*/
    41 
    4239                kdata_end = .;
    4340        }
    4441
    45 #ifdef CONFIG_LINE_DEBUG
    4642        .comment 0 : { *(.comment); }
    4743        .debug_abbrev 0 : { *(.debug_abbrev); }
     44        .debug_abbrev.dwo 0 : { *(      .debug_abbrev.dwo); }
     45        .debug_addr 0 : { *(.debug_addr); }
    4846        .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); }
    4950        .debug_info 0 : { *(.debug_info); }
     51        .debug_info.dwo 0 : { *(.debug_info.dwo); }
    5052        .debug_line 0 : { *(.debug_line); }
     53        .debug_line.dwo 0 : { *(.debug_line.dwo); }
     54        .debug_line_str 0 : { *(.debug_line_str); }
    5155        .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); }
    5262        .debug_pubnames 0 : { *(.debug_pubnames); }
    5363        .debug_pubtypes 0 : { *(.debug_pubtypes); }
    5464        .debug_ranges 0 : { *(.debug_ranges); }
     65        .debug_rnglists 0 : { *(.debug_rnglists); }
    5566        .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); }
    5772
    5873        /DISCARD/ : {
  • kernel/arch/arm32/_link.ld.in

    rd28bdbe rda13982  
    3737                *(COMMON);                      /* global variables */
    3838
    39                 *(.rodata*);
     39                *(.rodata .rodata.*);
     40                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     41                *(.eh_frame_hdr .eh_frame_hdr.*);
    4042                *(.sdata);
    4143                *(.reginfo);
    42                 . = ALIGN(8);
    43                 symbol_table = .;
    44                 *(symtab.*);
    4544        }
    4645        .sbss : {
     
    5150        kdata_end = .;
    5251
     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
    5383        /DISCARD/ : {
    5484          *(.mdebug*);
  • kernel/arch/arm64/_link.ld.in

    rd28bdbe rda13982  
    3232                *(COMMON);                      /* global variables */
    3333
    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.*);
    3837
    3938                kdata_end = .;
    4039        }
    4140
    42 #ifdef CONFIG_LINE_DEBUG
    4341        .comment 0 : { *(.comment); }
    4442        .debug_abbrev 0 : { *(.debug_abbrev); }
     43        .debug_abbrev.dwo 0 : { *(      .debug_abbrev.dwo); }
     44        .debug_addr 0 : { *(.debug_addr); }
    4545        .debug_aranges 0 : { *(.debug_aranges); }
     46        .debug_cu_index 0 : { *(.debug_cu_index); }
    4647        .debug_frame 0 : { *(.debug_frame); }
     48        .debug_frame_hdr 0 : { *(.debug_frame_hdr); }
    4749        .debug_info 0 : { *(.debug_info); }
     50        .debug_info.dwo 0 : { *(.debug_info.dwo); }
    4851        .debug_line 0 : { *(.debug_line); }
     52        .debug_line.dwo 0 : { *(.debug_line.dwo); }
     53        .debug_line_str 0 : { *(.debug_line_str); }
    4954        .debug_loc 0 : { *(.debug_loc); }
     55        .debug_loclists 0 : { *(.debug_loclists); }
     56        .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); }
    5057        .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); }
    5161        .debug_pubnames 0 : { *(.debug_pubnames); }
    5262        .debug_pubtypes 0 : { *(.debug_pubtypes); }
    5363        .debug_ranges 0 : { *(.debug_ranges); }
     64        .debug_rnglists 0 : { *(.debug_rnglists); }
    5465        .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); }
    5671
    5772        /DISCARD/ : {
  • kernel/arch/ia32/_link.ld.in

    rd28bdbe rda13982  
    2929                kdata_start = .;
    3030                *(.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.*);
    3234                *(COMMON);              /* global variables */
    3335
    3436                /* bss can't be omitted from the ELF image. */
    3537                *(.bss);                /* uninitialized static variables */
    36 
    37                 . = ALIGN(8);
    38                 symbol_table = .;
    39                 *(symtab.*);            /* Symbol table, must be LAST symbol! */
    4038                kdata_end = .;
    4139        }
    4240
    43 #ifdef CONFIG_LINE_DEBUG
    4441        .comment 0 : { *(.comment); }
    4542        .debug_abbrev 0 : { *(.debug_abbrev); }
     43        .debug_abbrev.dwo 0 : { *(      .debug_abbrev.dwo); }
     44        .debug_addr 0 : { *(.debug_addr); }
    4645        .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); }
    4749        .debug_info 0 : { *(.debug_info); }
     50        .debug_info.dwo 0 : { *(.debug_info.dwo); }
    4851        .debug_line 0 : { *(.debug_line); }
     52        .debug_line.dwo 0 : { *(.debug_line.dwo); }
     53        .debug_line_str 0 : { *(.debug_line_str); }
    4954        .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); }
    5061        .debug_pubnames 0 : { *(.debug_pubnames); }
    5162        .debug_pubtypes 0 : { *(.debug_pubtypes); }
    5263        .debug_ranges 0 : { *(.debug_ranges); }
     64        .debug_rnglists 0 : { *(.debug_rnglists); }
    5365        .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); }
    5571
    5672        /DISCARD/ : {
  • kernel/arch/ia64/_link.ld.in

    rd28bdbe rda13982  
    2424                kdata_start = .;
    2525                *(K_DATA_START)
    26                 *(.rodata .rodata.*)
     26                *(.rodata .rodata.*);
     27                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     28                *(.eh_frame_hdr .eh_frame_hdr.*);
    2729                *(.opd)
    2830                *(.data .data.*)
     
    3436                *(.bss)
    3537                *(COMMON);
    36 
    37                 . = ALIGN(8);
    38                 symbol_table = .;
    39                 *(symtab.*);            /* Symbol table, must be LAST symbol!*/
    40 
    4138                kdata_end = .;
    4239        }
     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); }
    4371
    4472        /DISCARD/ : {
  • kernel/arch/mips32/_link.ld.in

    rd28bdbe rda13982  
    3434                kdata_start = .;
    3535                *(.data);                       /* initialized data */
    36                 *(.rodata*);
     36                *(.rodata .rodata.*);
     37                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     38                *(.eh_frame_hdr .eh_frame_hdr.*);
    3739                *(.sdata);
    3840                *(.reginfo);
     
    4143                *(.bss);                        /* uninitialized static variables */
    4244                *(COMMON);                      /* global variables */
    43                 . = ALIGN(8);
    44                 symbol_table = .;
    45                 *(symtab.*);
    4645        }
    4746        _gp = . + 0x8000;
     
    5049
    5150        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); }
    5282
    5383        /DISCARD/ : {
  • kernel/arch/ppc32/_link.ld.in

    rd28bdbe rda13982  
    3434                *(K_DATA_START);
    3535                *(.rodata .rodata.*);
     36                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     37                *(.eh_frame_hdr .eh_frame_hdr.*);
    3638                *(.data);       /* initialized data */
    3739                *(.sdata);
     
    4042                *(.bss);        /* uninitialized static variables */
    4143                *(COMMON);      /* global variables */
    42 
    43                 . = ALIGN(8);
    44                 symbol_table = .;
    45                 *(symtab.*);    /* Symbol table, must be LAST symbol!*/
    46 
    4744                kdata_end = .;
    4845        }
     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); }
    4977
    5078        /DISCARD/ : {
  • kernel/arch/riscv64/_link.ld.in

    rd28bdbe rda13982  
    2424                kdata_start = .;
    2525                *(.data);                       /* initialized data */
    26                 *(.rodata*);
     26                *(.rodata .rodata.*);
     27                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     28                *(.eh_frame_hdr .eh_frame_hdr.*);
    2729                *(.sdata);
    2830                *(.reginfo);
     
    3133                *(.bss);                        /* uninitialized static variables */
    3234                *(COMMON);                      /* global variables */
    33                 . = ALIGN(8);
    34                 symbol_table = .;
    35                 *(symtab.*);
    3635                kdata_end = .;
    3736        }
     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); }
    3868
    3969        /DISCARD/ : {
  • kernel/arch/sparc64/_link.ld.in

    rd28bdbe rda13982  
    2323                *(K_DATA_START)
    2424                *(.rodata .rodata.*);
     25                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     26                *(.eh_frame_hdr .eh_frame_hdr.*);
    2527                *(.data);                   /* initialized data */
    2628                *(.sdata);
     
    3032                *(.bss);                    /* uninitialized static variables */
    3133                *(COMMON);                  /* global variables */
    32 
    33                 . = ALIGN(8);
    34                 symbol_table = .;
    35                 *(symtab.*);                /* Symbol table, must be LAST symbol!*/
    36 
    3734                kdata_end = .;
    3835        }
     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); }
    3967
    4068        /DISCARD/ : {
  • kernel/generic/include/debug.h

    rd28bdbe rda13982  
    3737
    3838#include <log.h>
    39 #include <symtab_lookup.h>
    4039#include <printf/verify.h>
    4140
     
    4342
    4443/* An empty printf function to ensure syntactic correctness of disabled debug prints. */
    45 _HELENOS_PRINTF_ATTRIBUTE(1, 2)
     44static inline void dummy_printf(const char *fmt, ...) _HELENOS_PRINTF_ATTRIBUTE(1, 2);
    4645static inline void dummy_printf(const char *fmt, ...)
    4746{
  • kernel/generic/include/debug/register.h

    rd28bdbe rda13982  
    11/*
    2  * Copyright (c) 2005 Ondrej Palkovsky
     2 * Copyright (c) 2023 Jiří Zárevúcky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup kernel_generic
    30  * @{
    31  */
    32 /** @file
    33  */
     29#ifndef DEBUG_REGISTER_H_
     30#define DEBUG_REGISTER_H_
    3431
    35 #ifndef KERN_SYMTAB_LOOKUP_H_
    36 #define KERN_SYMTAB_LOOKUP_H_
     32/** Accepts data of an ELF file containing debug sections. */
     33void register_debug_data(const void *data, size_t data_size);
    3734
    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  
    3636#define KERN_SYMTAB_H_
    3737
    38 #include <symtab_lookup.h>
    39 #include <console/chardev.h>
     38#include <typedefs.h>
    4039
    4140extern void symtab_print_search(const char *);
    4241extern const char *symtab_hints_enum(const char *, const char **, void **);
     42extern const char *symtab_fmt_name_lookup(uintptr_t);
     43extern errno_t symtab_addr_lookup(const char *, uintptr_t *);
     44extern const char *symtab_name_lookup(uintptr_t, uintptr_t *);
    4345
    4446#endif
  • kernel/generic/meson.build

    rd28bdbe rda13982  
    4646        'src/cpu/cpu_mask.c',
    4747        'src/ddi/irq.c',
    48         'src/debug/debug.c',
    4948        'src/debug/panic.c',
     49        'src/debug/profile.c',
     50        'src/debug/sections.c',
    5051        'src/debug/stacktrace.c',
    5152        'src/debug/symtab.c',
  • kernel/generic/src/console/kconsole.c

    rd28bdbe rda13982  
    8585SPINLOCK_INITIALIZE(cmd_lock);  /**< Lock protecting command list. */
    8686LIST_INITIALIZE(cmd_list);      /**< Command list. */
     87
     88#define MAX_SYMBOL_NAME 64
    8789
    8890static char32_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = { };
  • kernel/generic/src/debug/stacktrace.c

    rd28bdbe rda13982  
    106106kernel_symbol_resolve(uintptr_t addr, const char **sp, uintptr_t *op)
    107107{
    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;
    109112}
    110113
  • kernel/generic/src/debug/symtab.c

    rd28bdbe rda13982  
    4444#include <console/prompt.h>
    4545
    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
     49static inline size_t symtab_len()
     50{
     51        return symtab_size / sizeof(elf_symbol_t);
     52}
     53
     54static 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
     64static 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)
    6378                        break;
    6479        }
    6580
    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
     84const 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;
    81118}
    82119
     
    95132const char *symtab_fmt_name_lookup(uintptr_t addr)
    96133{
    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}
    146139
    147140/** Return address that corresponds to the entry.
     
    152145 * @param addr Place to store symbol address
    153146 *
    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
    156148 *
    157149 */
    158150errno_t symtab_addr_lookup(const char *name, uintptr_t *addr)
    159151{
    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;
    184160}
    185161
     
    187163void symtab_print_search(const char *name)
    188164{
    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        }
    201179}
    202180
    203181/** 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
     182const 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
    208190        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);
    224193
    225194                if (str_lcmp(input, curname, len) == 0) {
    226                         (*entry)++;
    227                         if (help)
    228                                 *help = NULL;
     195                        *ctx = (void *) (i + 1);
    229196                        return (curname + str_lsize(curname, len));
    230197                }
     
    232199
    233200        return NULL;
    234 
    235 #else
    236         return NULL;
    237 #endif
    238201}
    239202
  • kernel/generic/src/main/kinit.c

    rd28bdbe rda13982  
    7373#include <align.h>
    7474#include <stdlib.h>
     75#include <debug/register.h>
    7576
    7677#ifdef CONFIG_SMP
     
    182183         */
    183184        size_t i;
    184         program_t programs[CONFIG_INIT_TASKS];
     185        program_t programs[CONFIG_INIT_TASKS] = { };
    185186
    186187        // FIXME: do not propagate arguments through sysinfo
     
    237238                    PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE);
    238239                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                }
    239252
    240253                if (str_cmp(name, "loader") == 0) {
  • kernel/meson.build

    rd28bdbe rda13982  
    4141# Defines test_src
    4242subdir('test')
    43 
    44 ## Cross-platform assembly to start a symtab.data section
    45 #
    46 symtab_section = '.section symtab.data, "a", ' + atsign + 'progbits;'
    4743
    4844kernel_include_dirs = include_directories(
     
    9793endif
    9894
    99 if CONFIG_STRIP_BINARIES
    100         # TODO: do this after disassembling
    101         kernel_link_args += [ '-s' ]
    102 endif
    103 
    10495kernel_c_args = arch_kernel_c_args + kernel_defs + [
    10596        '-ffreestanding',
     
    149140all_kernel_objects = [ instrumentables, noninstrumentables ]
    150141
    151 # We iterate the build several times to get symbol table right.
    152 # Three times is sufficient to get correct even symbols after symtab.
     142kernel_name = 'kernel.elf'
     143kernel_map_name = kernel_name + '.map'
     144kernel_map_path = meson.current_build_dir() / kernel_map_name
     145
     146kernel_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
     158kernel_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
     169kernel_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
     180rd_init_binaries += [[ kernel_elf_stripped, 'boot/kernel.elf' ]]
     181install_files += [[ 'boot', kernel_elf_stripped.full_path(), 'kernel.elf' ]]
     182install_deps += [ kernel_elf_stripped ]
    153183
    154184if 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 ]
     188endif
    225189
    226190kernel_disasm = custom_target('kernel.elf.disasm',
  • meson.build

    rd28bdbe rda13982  
    6161
    6262## 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 endif
    6663if not is_variable('uspace_as_prolog')
    6764        uspace_as_prolog = ''
  • meson/arch/mips32/meson.build

    rd28bdbe rda13982  
    6161arch_boot_link_args = []
    6262
    63 
    64 kernel_as_prolog = '.module softfloat;'
    6563uspace_as_prolog = '.module softfloat;.abicalls;'
    66 
    6764
    6865if MACHINE == 'bmalta' or MACHINE == 'lmalta'
  • meson/part/initrd_manifest/meson.build

    rd28bdbe rda13982  
    2929# Init binaries. These are actually baked into the bootloader.
    3030rd_init = [
     31        # ELF file with DWARF debug sections for kernel.
     32        # Kernel detects this entry by name.
     33        'kernel.dbg',
     34
    3135        # IMPORTANT: The order of entries is important for bootloader!
    3236        'srv/ns',
Note: See TracChangeset for help on using the changeset viewer.