This is the mail archive of the binutils@sources.redhat.com 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: [RFA:] Skip symbol after warning symbol in gas/write.c:write_object_file


Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:

> I'm not sure whether the symbol following the warning stab
> should be used other than picking the name, but I guess it
> actually should, so there's an xfailed test-case for that (or
> two if you count ELF which is xfailed for not supporting the
> construct in its stabs support).

I don't think we should use the symbol following the a.out warning
stab for anything.  The warning stab should be followed by an
undefined symbol, which is what we should issue the warning about.
That undefined symbol should not be otherwise used for anything.  Note
that in typical uses, the symbol will be defined somewhere else in the
object file in any case.

Let me know if I am missing something.

> gas:
> 	* write.c (write_object_file): Recognize warning-symbol construct
> 	and skip object- and target- handling for the second symbol.
> 
> ld/testsuite:
> 	* ld-cris/globsymw2.s, ld-cris/globsymw3.s: New files.
> 	* ld-cris/warn3.d, ld-cris/warn4.d, ld-cris/warn5.d,
> 	ld-cris/warn6.d: New tests.

This is OK, if you adjust the testsuite according to the above.

Ian


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