mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-28 18:03:39 +08:00
* linker.c (fix_syms): Consider SEC_LOAD when choosing section.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
|
||||||
|
|
||||||
|
* linker.c (fix_syms): Consider SEC_LOAD when choosing section.
|
||||||
|
|
||||||
2009-07-30 Alan Modra <amodra@bigpond.net.au>
|
2009-07-30 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
|
* elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
|
||||||
|
10
bfd/linker.c
10
bfd/linker.c
@ -3149,10 +3149,16 @@ fix_syms (struct bfd_link_hash_entry *h, void *data)
|
|||||||
else if (op == NULL)
|
else if (op == NULL)
|
||||||
op = op1;
|
op = op1;
|
||||||
else if (((op1->flags ^ op->flags)
|
else if (((op1->flags ^ op->flags)
|
||||||
& (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0)
|
& (SEC_ALLOC | SEC_THREAD_LOCAL | SEC_LOAD)) != 0)
|
||||||
{
|
{
|
||||||
if (((op->flags ^ s->flags)
|
if (((op->flags ^ s->flags)
|
||||||
& (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0)
|
& (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0
|
||||||
|
/* We prefer to choose a loaded section. Section S
|
||||||
|
doesn't have SEC_LOAD set (it being excluded, that
|
||||||
|
part of the flag processing didn't happen) so we
|
||||||
|
can't compare that flag to those of OP and OP1. */
|
||||||
|
|| ((op1->flags & SEC_LOAD) != 0
|
||||||
|
&& (op->flags & SEC_LOAD) == 0))
|
||||||
op = op1;
|
op = op1;
|
||||||
}
|
}
|
||||||
else if (((op1->flags ^ op->flags) & SEC_READONLY) != 0)
|
else if (((op1->flags ^ op->flags) & SEC_READONLY) != 0)
|
||||||
|
Reference in New Issue
Block a user