GNU Binutils with patches for OS216
Revisión | 32a0481fb147de2cd08c2980b177c298b4582ce7 (tree) |
---|---|
Tiempo | 2016-07-09 16:23:33 |
Autor | Alan Modra <amodra@gmai...> |
Commiter | Alan Modra |
PR20337, Objdump makes poor choice of symbols
binutils/
PR binutils/20337
* objdump.c (compare_symbols): For ELF, sort same value/type
symbols according to size.
ld/
* testsuite/ld-powerpc/elfv2exe.d: Update.
@@ -1,3 +1,9 @@ | ||
1 | +2016-07-09 Alan Modra <amodra@gmail.com> | |
2 | + | |
3 | + PR binutils/20337 | |
4 | + * objdump.c (compare_symbols): For ELF, sort same value/type | |
5 | + symbols according to size. | |
6 | + | |
1 | 7 | 2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com> |
2 | 8 | |
3 | 9 | * objdump.c (dump_section_header): Rename SEC_ELF_NOREAD |
@@ -738,6 +738,21 @@ compare_symbols (const void *ap, const void *bp) | ||
738 | 738 | return 1; |
739 | 739 | } |
740 | 740 | |
741 | + if (bfd_get_flavour (bfd_asymbol_bfd (a)) == bfd_target_elf_flavour | |
742 | + && bfd_get_flavour (bfd_asymbol_bfd (b)) == bfd_target_elf_flavour) | |
743 | + { | |
744 | + bfd_vma asz, bsz; | |
745 | + | |
746 | + asz = 0; | |
747 | + if ((a->flags & BSF_SYNTHETIC) == 0) | |
748 | + asz = ((elf_symbol_type *) a)->internal_elf_sym.st_size; | |
749 | + bsz = 0; | |
750 | + if ((b->flags & BSF_SYNTHETIC) == 0) | |
751 | + bsz = ((elf_symbol_type *) b)->internal_elf_sym.st_size; | |
752 | + if (asz != bsz) | |
753 | + return asz > bsz ? -1 : 1; | |
754 | + } | |
755 | + | |
741 | 756 | /* Symbols that start with '.' might be section names, so sort them |
742 | 757 | after symbols that don't start with '.'. */ |
743 | 758 | if (an[0] == '.' && bn[0] != '.') |
@@ -1,3 +1,7 @@ | ||
1 | +2016-07-09 Alan Modra <amodra@gmail.com> | |
2 | + | |
3 | + * testsuite/ld-powerpc/elfv2exe.d: Update. | |
4 | + | |
1 | 5 | 2016-07-06 James Bowman <james.bowman@ftdichip.com> |
2 | 6 | |
3 | 7 | * scripttempl/ft32.sc (__PMSIZE): Correct __PMSIZE_. |
@@ -19,13 +19,13 @@ Disassembly of section \.text: | ||
19 | 19 | .*: (7d 89 03 a6|a6 03 89 7d) mtctr r12 |
20 | 20 | .*: (4e 80 04 20|20 04 80 4e) bctr |
21 | 21 | |
22 | -0+100000e0 <_start>: | |
22 | +0+100000e0 <(f1|_start)>: | |
23 | 23 | .*: (3c 40 10 02|02 10 40 3c) lis r2,4098 |
24 | 24 | .*: (38 42 82 00|00 82 42 38) addi r2,r2,-32256 |
25 | 25 | .*: (7c 08 02 a6|a6 02 08 7c) mflr r0 |
26 | 26 | .*: (f8 21 ff e1|e1 ff 21 f8) stdu r1,-32\(r1\) |
27 | 27 | .*: (f8 01 00 30|30 00 01 f8) std r0,48\(r1\) |
28 | -.*: (4b ff ff f5|f5 ff ff 4b) bl .* <_start\+0x8> | |
28 | +.*: (4b ff ff f5|f5 ff ff 4b) bl .* <(f1|_start)\+0x8> | |
29 | 29 | .*: (e8 62 80 08|08 80 62 e8) ld r3,-32760\(r2\) |
30 | 30 | .*: (4b ff ff c5|c5 ff ff 4b) bl .*\.plt_branch\.f2> |
31 | 31 | .*: (60 00 00 00|00 00 00 60) nop |