projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cc96ee
)
.debug sections without contents
author
Alan Modra
<amodra@gmail.com>
Fri, 10 Feb 2023 12:46:34 +0000
(23:16 +1030)
committer
Alan Modra
<amodra@gmail.com>
Sat, 11 Feb 2023 06:11:00 +0000
(16:41 +1030)
* dwarf1.c (_bfd_dwarf1_find_nearest_line): Exclude .debug
sections without contents.
bfd/dwarf1.c
patch
|
blob
|
history
diff --git
a/bfd/dwarf1.c
b/bfd/dwarf1.c
index c851f674680fb85a1f3c9e5cee063086f3edf25c..90461004b0a546466a70d89d25fcb7229489d48f 100644
(file)
--- a/
bfd/dwarf1.c
+++ b/
bfd/dwarf1.c
@@
-510,7
+510,8
@@
_bfd_dwarf1_find_nearest_line (bfd *abfd,
return false;
msec = bfd_get_section_by_name (abfd, ".debug");
- if (! msec)
+ if (! msec
+ || (msec->flags & SEC_HAS_CONTENTS) == 0)
/* No dwarf1 info. Note that at this point the stash
has been allocated, but contains zeros, this lets
future calls to this function fail quicker. */