diff options
| author | Nicholas Piggin <npiggin@gmail.com> | 2017-05-11 13:40:40 -0400 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-05-30 00:59:51 -0400 |
| commit | 83a092cf95f28696ddc36c8add0cf03ac034897f (patch) | |
| tree | 61b7aab91d026e0722f1d347c9931d194cf3aaac /include/asm-generic | |
| parent | c494adefef9fcd0de172132e20f102d44c62fa2f (diff) | |
powerpc: Link warning for orphan sections
Add --orphan-handling=warn to final link flags. This ensures we can
handle all sections explicitly. This would have caught subtle breakage
such as 7de3b27bac47da9de08409df1d69664acbb72197 at build-time.
Also bring existing orphan sections into the fold:
- .text.hot and .text.unlikely are compiler generated sections.
- .sdata2, .dynsbss, .plt are used by PPC32
- We previously did not specify DWARF_DEBUG or STABS_DEBUG
- DWARF_DEBUG did not include all DWARF sections that can be emitted
- A number of sections are unused and can be discarded.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 314a0b9219c6..9862afb3ae05 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -595,6 +595,7 @@ | |||
| 595 | #define SBSS(sbss_align) \ | 595 | #define SBSS(sbss_align) \ |
| 596 | . = ALIGN(sbss_align); \ | 596 | . = ALIGN(sbss_align); \ |
| 597 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \ | 597 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \ |
| 598 | *(.dynsbss) \ | ||
| 598 | *(.sbss) \ | 599 | *(.sbss) \ |
| 599 | *(.scommon) \ | 600 | *(.scommon) \ |
| 600 | } | 601 | } |
| @@ -641,11 +642,22 @@ | |||
| 641 | .debug_str 0 : { *(.debug_str) } \ | 642 | .debug_str 0 : { *(.debug_str) } \ |
| 642 | .debug_loc 0 : { *(.debug_loc) } \ | 643 | .debug_loc 0 : { *(.debug_loc) } \ |
| 643 | .debug_macinfo 0 : { *(.debug_macinfo) } \ | 644 | .debug_macinfo 0 : { *(.debug_macinfo) } \ |
| 645 | .debug_pubtypes 0 : { *(.debug_pubtypes) } \ | ||
| 646 | /* DWARF 3 */ \ | ||
| 647 | .debug_ranges 0 : { *(.debug_ranges) } \ | ||
| 644 | /* SGI/MIPS DWARF 2 extensions */ \ | 648 | /* SGI/MIPS DWARF 2 extensions */ \ |
| 645 | .debug_weaknames 0 : { *(.debug_weaknames) } \ | 649 | .debug_weaknames 0 : { *(.debug_weaknames) } \ |
| 646 | .debug_funcnames 0 : { *(.debug_funcnames) } \ | 650 | .debug_funcnames 0 : { *(.debug_funcnames) } \ |
| 647 | .debug_typenames 0 : { *(.debug_typenames) } \ | 651 | .debug_typenames 0 : { *(.debug_typenames) } \ |
| 648 | .debug_varnames 0 : { *(.debug_varnames) } \ | 652 | .debug_varnames 0 : { *(.debug_varnames) } \ |
| 653 | /* GNU DWARF 2 extensions */ \ | ||
| 654 | .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) } \ | ||
| 655 | .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) } \ | ||
| 656 | /* DWARF 4 */ \ | ||
| 657 | .debug_types 0 : { *(.debug_types) } \ | ||
| 658 | /* DWARF 5 */ \ | ||
| 659 | .debug_macro 0 : { *(.debug_macro) } \ | ||
| 660 | .debug_addr 0 : { *(.debug_addr) } | ||
| 649 | 661 | ||
| 650 | /* Stabs debugging sections. */ | 662 | /* Stabs debugging sections. */ |
| 651 | #define STABS_DEBUG \ | 663 | #define STABS_DEBUG \ |
