Ignore non-stub sections for nios2 stub_bfd processing.
2014-04-10 Cesar Philippidis <cesar@codesourcery.com> bfd/ * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs when building function stubs.
This commit is contained in:
parent
0a1478f501
commit
1511baeca9
2 changed files with 19 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-04-10 Cesar Philippidis <cesar@codesourcery.com>
|
||||||
|
|
||||||
|
* elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs
|
||||||
|
when building function stubs.
|
||||||
|
|
||||||
2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
|
2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
|
||||||
|
|
||||||
* elf32-avr.c: Add DIFF relocations for AVR.
|
* elf32-avr.c: Add DIFF relocations for AVR.
|
||||||
|
|
|
@ -2013,16 +2013,21 @@ nios2_elf32_build_stubs (struct bfd_link_info *info)
|
||||||
for (stub_sec = htab->stub_bfd->sections;
|
for (stub_sec = htab->stub_bfd->sections;
|
||||||
stub_sec != NULL;
|
stub_sec != NULL;
|
||||||
stub_sec = stub_sec->next)
|
stub_sec = stub_sec->next)
|
||||||
{
|
/* The stub_bfd may contain non-stub sections if it is also the
|
||||||
bfd_size_type size;
|
dynobj. Any such non-stub sections are created with the
|
||||||
|
SEC_LINKER_CREATED flag set, while stub sections do not
|
||||||
|
have that flag. Ignore any non-stub sections here. */
|
||||||
|
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
|
||||||
|
{
|
||||||
|
bfd_size_type size;
|
||||||
|
|
||||||
/* Allocate memory to hold the linker stubs. */
|
/* Allocate memory to hold the linker stubs. */
|
||||||
size = stub_sec->size;
|
size = stub_sec->size;
|
||||||
stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
|
stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
|
||||||
if (stub_sec->contents == NULL && size != 0)
|
if (stub_sec->contents == NULL && size != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
stub_sec->size = 0;
|
stub_sec->size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build the stubs as directed by the stub hash table. */
|
/* Build the stubs as directed by the stub hash table. */
|
||||||
table = &htab->bstab;
|
table = &htab->bstab;
|
||||||
|
|
Loading…
Reference in a new issue