Summary: | as -g: remove non-executable sections' contribution from DW_AT_ranges | ||
---|---|---|---|
Product: | binutils | Reporter: | Fangrui Song <i> |
Component: | gas | Assignee: | Nick Clifton <nickc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nickc |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2020-11-11 00:00:00 |
Description
Fangrui Song
2020-11-06 17:28:43 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bcb78b47614ed252226da1a688558a17d8a99ce8 commit bcb78b47614ed252226da1a688558a17d8a99ce8 Author: Nick Clifton <nickc@redhat.com> Date: Thu Nov 12 11:43:20 2020 +0000 Stop Gas from generating line info or address ranges for sections that do not contain code or are not loaded. PR 26850 * dwarf2dbg.c (dwarf2_gen_line_info_1): Do not record lines in sections that are not executable or not loadable. (out_debug_line): Move warning message into dwarf2_gen_line_info_1. * testsuite/gas/elf/dwarf2-20.s: New test. * testsuite/gas/elf/dwarf2-20.d: New test driver. * testsuite/gas/elf/elf.exp: Run the new test. * testsuite/gas/elf/warn-2.s: Use the .nop directive. Hi Fangrui, Agreed. I have applied a patch to implement this suggestion. I also extended it to cover sections that are not loaded as well, since I do not see how debug information for them would be useful either. Cheers Nick |