* elf64-ppc.c (compare_symbols): Prefer strong dynamic global
function syms over other syms.
This commit is contained in:
parent
c9fe3751af
commit
4d35a0aa88
|
@ -1,3 +1,8 @@
|
|||
2006-05-23 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf64-ppc.c (compare_symbols): Prefer strong dynamic global
|
||||
function syms over other syms.
|
||||
|
||||
2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* elflink.c (_bfd_elf_add_dynamic_entry): Remove DT_TEXTREL
|
||||
|
|
|
@ -2626,6 +2626,32 @@ compare_symbols (const void *ap, const void *bp)
|
|||
if (a->value + a->section->vma > b->value + b->section->vma)
|
||||
return 1;
|
||||
|
||||
/* For syms with the same value, prefer strong dynamic global function
|
||||
syms over other syms. */
|
||||
if ((a->flags & BSF_GLOBAL) != 0 && (b->flags & BSF_GLOBAL) == 0)
|
||||
return -1;
|
||||
|
||||
if ((a->flags & BSF_GLOBAL) == 0 && (b->flags & BSF_GLOBAL) != 0)
|
||||
return 1;
|
||||
|
||||
if ((a->flags & BSF_FUNCTION) != 0 && (b->flags & BSF_FUNCTION) == 0)
|
||||
return -1;
|
||||
|
||||
if ((a->flags & BSF_FUNCTION) == 0 && (b->flags & BSF_FUNCTION) != 0)
|
||||
return 1;
|
||||
|
||||
if ((a->flags & BSF_WEAK) == 0 && (b->flags & BSF_WEAK) != 0)
|
||||
return -1;
|
||||
|
||||
if ((a->flags & BSF_WEAK) != 0 && (b->flags & BSF_WEAK) == 0)
|
||||
return 1;
|
||||
|
||||
if ((a->flags & BSF_DYNAMIC) != 0 && (b->flags & BSF_DYNAMIC) == 0)
|
||||
return -1;
|
||||
|
||||
if ((a->flags & BSF_DYNAMIC) == 0 && (b->flags & BSF_DYNAMIC) != 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue