PR ld/15762
PR ld/12761 * elflink.c (elf_link_add_object_symbols): Correct test in last patch. Remove unnecessary code.
This commit is contained in:
parent
8c058e6af3
commit
db6a5d5f90
2 changed files with 53 additions and 57 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2013-07-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR ld/15762
|
||||||
|
PR ld/12761
|
||||||
|
* elflink.c (elf_link_add_object_symbols): Correct test in
|
||||||
|
last patch. Remove unnecessary code.
|
||||||
|
|
||||||
2013-07-24 Tristan Gingold <gingold@adacore.com>
|
2013-07-24 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* coff-rs6000.c (xcoff_howto_table): Fix masks and pc_relative for
|
* coff-rs6000.c (xcoff_howto_table): Fix masks and pc_relative for
|
||||||
|
|
|
@ -3344,6 +3344,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
long old_dynsymcount = 0;
|
long old_dynsymcount = 0;
|
||||||
bfd_size_type old_dynstr_size = 0;
|
bfd_size_type old_dynstr_size = 0;
|
||||||
size_t tabsize = 0;
|
size_t tabsize = 0;
|
||||||
|
asection *s;
|
||||||
|
|
||||||
htab = elf_hash_table (info);
|
htab = elf_hash_table (info);
|
||||||
bed = get_elf_backend_data (abfd);
|
bed = get_elf_backend_data (abfd);
|
||||||
|
@ -3385,10 +3386,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
symbol. This differs from .gnu.warning sections, which generate
|
symbol. This differs from .gnu.warning sections, which generate
|
||||||
warnings when they are included in an output file. */
|
warnings when they are included in an output file. */
|
||||||
/* PR 12761: Also generate this warning when building shared libraries. */
|
/* PR 12761: Also generate this warning when building shared libraries. */
|
||||||
if (info->executable || info->shared)
|
|
||||||
{
|
|
||||||
asection *s;
|
|
||||||
|
|
||||||
for (s = abfd->sections; s != NULL; s = s->next)
|
for (s = abfd->sections; s != NULL; s = s->next)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
|
@ -3420,14 +3417,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
if (h != NULL
|
if (h != NULL
|
||||||
&& (h->root.type == bfd_link_hash_defined
|
&& (h->root.type == bfd_link_hash_defined
|
||||||
|| h->root.type == bfd_link_hash_defweak))
|
|| h->root.type == bfd_link_hash_defweak))
|
||||||
{
|
|
||||||
/* We don't want to issue this warning. Clobber
|
|
||||||
the section size so that the warning does not
|
|
||||||
get copied into the output file. */
|
|
||||||
s->size = 0;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
sz = s->size;
|
sz = s->size;
|
||||||
msg = (char *) bfd_alloc (abfd, sz + 1);
|
msg = (char *) bfd_alloc (abfd, sz + 1);
|
||||||
|
@ -3444,7 +3435,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
FALSE, bed->collect, NULL)))
|
FALSE, bed->collect, NULL)))
|
||||||
goto error_return;
|
goto error_return;
|
||||||
|
|
||||||
if (!info->relocatable && !info->shared)
|
if (!info->relocatable && info->executable)
|
||||||
{
|
{
|
||||||
/* Clobber the section size so that the warning does
|
/* Clobber the section size so that the warning does
|
||||||
not get copied into the output file. */
|
not get copied into the output file. */
|
||||||
|
@ -3456,7 +3447,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
add_needed = TRUE;
|
add_needed = TRUE;
|
||||||
if (! dynamic)
|
if (! dynamic)
|
||||||
|
@ -3479,7 +3469,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
goto error_return;
|
goto error_return;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
asection *s;
|
|
||||||
const char *soname = NULL;
|
const char *soname = NULL;
|
||||||
char *audit = NULL;
|
char *audit = NULL;
|
||||||
struct bfd_link_needed_list *rpath = NULL, *runpath = NULL;
|
struct bfd_link_needed_list *rpath = NULL, *runpath = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue