mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
Revert "Also check e_machine when merging sections"
Commit 9865bd0d added a bogus check in _bfd_elf_merge_sections. bfd/ PR ld/19013 * elflink.c (_bfd_elf_merge_sections): Revert last change. ld/testsuite/ * ld-x86-64/pr19013-x32.d: Update.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2015-10-01 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR ld/19013
|
||||||
|
* elflink.c (_bfd_elf_merge_sections): Revert last change.
|
||||||
|
|
||||||
2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
|
2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR ld/19031
|
PR ld/19031
|
||||||
|
@ -6818,23 +6818,15 @@ _bfd_elf_merge_sections (bfd *obfd, struct bfd_link_info *info)
|
|||||||
{
|
{
|
||||||
bfd *ibfd;
|
bfd *ibfd;
|
||||||
asection *sec;
|
asection *sec;
|
||||||
const struct elf_backend_data *bed;
|
|
||||||
|
|
||||||
if (!is_elf_hash_table (info->hash))
|
if (!is_elf_hash_table (info->hash))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
bed = get_elf_backend_data (obfd);
|
|
||||||
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
|
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
|
||||||
if ((ibfd->flags & DYNAMIC) == 0
|
if ((ibfd->flags & DYNAMIC) == 0
|
||||||
&& bfd_get_flavour (ibfd) == bfd_target_elf_flavour
|
&& bfd_get_flavour (ibfd) == bfd_target_elf_flavour
|
||||||
&& (elf_elfheader (ibfd)->e_ident[EI_CLASS] == bed->s->elfclass)
|
&& (elf_elfheader (ibfd)->e_ident[EI_CLASS]
|
||||||
&& (bed->elf_machine_code == elf_elfheader (ibfd)->e_machine
|
== get_elf_backend_data (obfd)->s->elfclass))
|
||||||
|| (bed->elf_machine_alt1 != 0
|
|
||||||
&& (bed->elf_machine_alt1
|
|
||||||
== elf_elfheader (ibfd)->e_machine))
|
|
||||||
|| (bed->elf_machine_alt2 != 0
|
|
||||||
&& (bed->elf_machine_alt2
|
|
||||||
== elf_elfheader (ibfd)->e_machine))))
|
|
||||||
for (sec = ibfd->sections; sec != NULL; sec = sec->next)
|
for (sec = ibfd->sections; sec != NULL; sec = sec->next)
|
||||||
if ((sec->flags & SEC_MERGE) != 0
|
if ((sec->flags & SEC_MERGE) != 0
|
||||||
&& !bfd_is_abs_section (sec->output_section))
|
&& !bfd_is_abs_section (sec->output_section))
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2015-10-01 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* ld-x86-64/pr19013-x32.d: Update.
|
||||||
|
|
||||||
2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
|
2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* ld-x86-64/pr19013.d (ld): Add -m elf_x86_64.
|
* ld-x86-64/pr19013.d (ld): Add -m elf_x86_64.
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
#notarget: x86_64-*-nacl*
|
#notarget: x86_64-*-nacl*
|
||||||
|
|
||||||
#...
|
#...
|
||||||
[0-9a-f]+ 00000203 00414243 4400 +.....ABCD. +
|
[0-9a-f]+ 02030041 42434400 +...ABCD. +
|
||||||
#pass
|
#pass
|
||||||
|
Reference in New Issue
Block a user