aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-02-21 12:01:27 +0000
committerAlan Modra <amodra@gmail.com>2000-02-21 12:01:27 +0000
commitf6af82bd4470673eef9562d4ed3a2717c1d749ab (patch)
tree049fedd33d8bf74259017f441ef55ee8920b9cc2 /bfd/elflink.h
parent2403ff6fdb9d23ee79863d2b2aacac46a2d8283d (diff)
downloadgdb-f6af82bd4470673eef9562d4ed3a2717c1d749ab.zip
gdb-f6af82bd4470673eef9562d4ed3a2717c1d749ab.tar.gz
gdb-f6af82bd4470673eef9562d4ed3a2717c1d749ab.tar.bz2
This lot mainly cleans up `comparison between signed and unsigned' gcc
warnings. One usused var, and a macro parenthesis fix too. Also check input sections are elf when doing gc in elflink.h.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 78a5e34..54577a6 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -6202,6 +6202,9 @@ elf_gc_sweep (info, gc_sweep_hook)
{
asection *o;
+ if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
+ continue;
+
for (o = sub->sections; o != NULL; o = o->next)
{
/* Keep special sections. Keep .debug sections. */
@@ -6416,6 +6419,10 @@ elf_gc_sections (abfd, info)
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
asection *o;
+
+ if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
+ continue;
+
for (o = sub->sections; o != NULL; o = o->next)
{
if (o->flags & SEC_KEEP)
@@ -6571,10 +6578,14 @@ elf_gc_common_finalize_got_offsets (abfd, info)
/* Do the local .got entries first. */
for (i = info->input_bfds; i; i = i->link_next)
{
- bfd_signed_vma *local_got = elf_local_got_refcounts (i);
+ bfd_signed_vma *local_got;
bfd_size_type j, locsymcount;
Elf_Internal_Shdr *symtab_hdr;
+ if (bfd_get_flavour (i) != bfd_target_elf_flavour)
+ continue;
+
+ local_got = elf_local_got_refcounts (i);
if (!local_got)
continue;