mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-01-09 13:40:47 +00:00
PR ld/13468
* elflink.c (bfd_elf_final_link): Don't segfault when checking for DT_TEXTREL and .dynamic does not exist.
This commit is contained in:
parent
68ba6d402d
commit
be7b303d27
@ -1,3 +1,9 @@
|
||||
2011-12-03 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR ld/13468
|
||||
* elflink.c (bfd_elf_final_link): Don't segfault when checking
|
||||
for DT_TEXTREL and .dynamic does not exist.
|
||||
|
||||
2011-12-03 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR ld/13470
|
||||
|
@ -11188,15 +11188,12 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
goto error_return;
|
||||
|
||||
/* Check for DT_TEXTREL (late, in case the backend removes it). */
|
||||
if ((info->warn_shared_textrel && info->shared)
|
||||
|| info->error_textrel)
|
||||
if (((info->warn_shared_textrel && info->shared)
|
||||
|| info->error_textrel)
|
||||
&& (o = bfd_get_section_by_name (dynobj, ".dynamic")) != NULL)
|
||||
{
|
||||
bfd_byte *dyncon, *dynconend;
|
||||
|
||||
/* Fix up .dynamic entries. */
|
||||
o = bfd_get_section_by_name (dynobj, ".dynamic");
|
||||
BFD_ASSERT (o != NULL);
|
||||
|
||||
dyncon = o->contents;
|
||||
dynconend = o->contents + o->size;
|
||||
for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
|
||||
|
Loading…
Reference in New Issue
Block a user