aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-03-26 11:54:12 +0000
committerAlan Modra <amodra@gmail.com>2002-03-26 11:54:12 +0000
commitb91afed73bdfb757fef53f36d6a7ffe8357fafe0 (patch)
tree4a48067e05da9f3c6b9f8f7e14f9b4d4108e555b /bfd/elflink.h
parent523ac3f9a3ea553a53aa0685a824fd7482b25c9b (diff)
downloadgdb-b91afed73bdfb757fef53f36d6a7ffe8357fafe0.zip
gdb-b91afed73bdfb757fef53f36d6a7ffe8357fafe0.tar.gz
gdb-b91afed73bdfb757fef53f36d6a7ffe8357fafe0.tar.bz2
* elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index d84f2a5..43abe17 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -7570,11 +7570,15 @@ elf_gc_mark (info, sec, gc_mark_hook)
}
if (rsec && !rsec->gc_mark)
- if (!elf_gc_mark (info, rsec, gc_mark_hook))
- {
- ret = false;
- goto out2;
- }
+ {
+ if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour)
+ rsec->gc_mark = 1;
+ else if (!elf_gc_mark (info, rsec, gc_mark_hook))
+ {
+ ret = false;
+ goto out2;
+ }
+ }
}
out2: