mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-01 18:32:32 +08:00
[AArch64] Factor out _bfd_aarch64_resize_stubs()
This commit is contained in:

committed by
Marcus Shawcroft

parent
6658567565
commit
13f622ec59
@ -1,3 +1,9 @@
|
|||||||
|
2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
||||||
|
|
||||||
|
* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
|
||||||
|
stub resize code into...
|
||||||
|
(bfd_aarch64_resize_stubs): Define.
|
||||||
|
|
||||||
2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
||||||
|
|
||||||
* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
|
* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
|
||||||
|
@ -3118,6 +3118,29 @@ erratum_835769_scan (bfd *input_bfd,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Resize all stub sections. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
_bfd_aarch64_resize_stubs (struct elf_aarch64_link_hash_table *htab)
|
||||||
|
{
|
||||||
|
asection *section;
|
||||||
|
|
||||||
|
/* OK, we've added some stubs. Find out the new size of the
|
||||||
|
stub sections. */
|
||||||
|
for (section = htab->stub_bfd->sections;
|
||||||
|
section != NULL; section = section->next)
|
||||||
|
{
|
||||||
|
/* Ignore non-stub sections. */
|
||||||
|
if (!strstr (section->name, STUB_SUFFIX))
|
||||||
|
continue;
|
||||||
|
section->size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bfd_hash_traverse (&htab->stub_hash_table, aarch64_size_one_stub, htab);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Determine and set the size of the stub section for a final link.
|
/* Determine and set the size of the stub section for a final link.
|
||||||
|
|
||||||
The basic idea here is to examine all the relocations looking for
|
The basic idea here is to examine all the relocations looking for
|
||||||
@ -3453,18 +3476,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd,
|
|||||||
if (!stub_changed)
|
if (!stub_changed)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* OK, we've added some stubs. Find out the new size of the
|
_bfd_aarch64_resize_stubs (htab);
|
||||||
stub sections. */
|
|
||||||
for (stub_sec = htab->stub_bfd->sections;
|
|
||||||
stub_sec != NULL; stub_sec = stub_sec->next)
|
|
||||||
{
|
|
||||||
/* Ignore non-stub sections. */
|
|
||||||
if (!strstr (stub_sec->name, STUB_SUFFIX))
|
|
||||||
continue;
|
|
||||||
stub_sec->size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bfd_hash_traverse (&htab->stub_hash_table, aarch64_size_one_stub, htab);
|
|
||||||
|
|
||||||
/* Add erratum 835769 veneers to stub section sizes too. */
|
/* Add erratum 835769 veneers to stub section sizes too. */
|
||||||
if (htab->fix_erratum_835769)
|
if (htab->fix_erratum_835769)
|
||||||
|
Reference in New Issue
Block a user