This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, microblaze, gas, bfd] PR/14736 Correct adjustment of global symbols after relax


On 11/22/2012 04:05 AM, David Holsgrove wrote:

Fixup symbol sizes after linker relaxation


Correct an off-by one when comparing relaxation addresses
with symbol start.

Also addresses PR/14736 where clang gave warning;
use of unary operator that may be intended as
compound assignment (-=)

binutils/bfd/Changelog

2012-11-22 Edgar E. Iglesias <edgar.iglesias@gmail.com>

           * elf32-microblaze.c (calc_size_fixup): New
             (calc_fixup): Use calc_size_fixup to adjust
             object size

binutils/gas/testsuite/Changelog

2012-11-22 David Holsgrove <david.holsgrove@xilinx.com>

           * gas/microblaze/relax_size.exp: New file - test
             object size after linker relaxation
           * gas/microblaze/relax_size.s: Likewise
           * gas/microblaze/relax_size.elf: Likewise

calc_size_fixup() is almost the same as calc_fixup(). Comments say they do the same thing. Are both needed? When would the values returned be different?

+            int count, count_size;
+
+            count = calc_fixup (isym->st_value, sec);
+            count_size = calc_size_fixup (isym->st_value, isym->st_size, sec);

The values returned by calc_fixup() and calc_size_fixup() are not counts, but
the total size of the fixups.  Please use more descriptive names (2 places).

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]