aboutsummaryrefslogtreecommitdiff
path: root/bfd
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
parent523ac3f9a3ea553a53aa0685a824fd7482b25c9b (diff)
downloadbinutils-b91afed73bdfb757fef53f36d6a7ffe8357fafe0.zip
binutils-b91afed73bdfb757fef53f36d6a7ffe8357fafe0.tar.gz
binutils-b91afed73bdfb757fef53f36d6a7ffe8357fafe0.tar.bz2
* elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elflink.h14
2 files changed, 13 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3b53150..28f8b32 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2002-03-26 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
+
2002-03-23 Alan Modra <amodra@bigpond.net.au>
* elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
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: