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: [nonworking patch] gold/arm: define $a/$d markers in .plt


Roland McGrath <mcgrathr@google.com> writes:

> On Wed, Apr 18, 2012 at 11:19 AM, Cary Coutant <ccoutant@google.com> wrote:
>> It Âlooks to me like the "if (0)" is preventing those new locals from
>> being written to the output file:
> [...]
>> Did you forget to remove a hack?
>
> D'oh!  Clearly I did.  But removing that doesn't change the results.
> I think I just added that while debugging to verify that this code
> was not having any effect.
>
> What's happening is that the symbols it writes are later being overwritten
> with globals.  This is because first_global_index hasn't counted the
> generated_locals.  I tried a couple of different tacks to increment it
> but those ran afoul of other assertions.  I really don't understand the
> bookkeeping associated with first_global_index_ and output_count_.

The first_global_index_ field is the index in the symbol table of the
first symbol controlled by the Symbol_table, as opposed to the local
symbols produced by the input object files.  The name is (I apologize)
misleading because there are local symbols at that index, namely those
global symbols that were forced to be local by a version script.

The output_count_ field is simply the number of output symbols generated
from the symbol table.  Not all symbols in the symbol table are put into
the output file.

Your symbols should presumably be handled in
Symbol_table::sized_finalize just like those in the forced_locals_ list.

Ian


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