This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] bfd: fix elflink.c build
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: <binutils at sourceware dot org>
- Cc: "Alan Modra" <amodra at gmail dot com>
- Date: Tue, 10 Jul 2018 07:31:59 -0600
- Subject: [PATCH] bfd: fix elflink.c build
Commit b8a6ced796 ("Correct removal of .gnu.attributes") introduced a
"remove" local variable, but "remove" is an identifier older stdio.h
supplies, and at least some compiler versions complain about the
shadowing of the name.
bfd/
2018-07-10 Jan Beulich <jbeulich@suse.com>
* elflink.c (bfd_elf_final_link): Rename "remove" to "rm".
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -11719,7 +11719,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
std_attrs_section = get_elf_backend_data (abfd)->obj_attrs_section;
for (o = abfd->sections; o != NULL; o = o->next)
{
- bfd_boolean remove = FALSE;
+ bfd_boolean rm = FALSE;
if ((std_attrs_section && strcmp (o->name, std_attrs_section) == 0)
|| strcmp (o->name, ".gnu.attributes") == 0)
@@ -11743,14 +11743,14 @@ bfd_elf_final_link (bfd *abfd, struct bf
if (attr_size)
attr_section = o;
else
- remove = TRUE;
+ rm = TRUE;
}
else if ((o->flags & SEC_GROUP) != 0 && o->size == 0)
{
/* Remove empty group section from linker output. */
- remove = TRUE;
+ rm = TRUE;
}
- if (remove)
+ if (rm)
{
o->flags |= SEC_EXCLUDE;
bfd_section_list_remove (abfd, o);