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: C6X: Keep OS/ABI when running strip


On 06/27/11 17:53, Joseph S. Myers wrote:
> On Mon, 27 Jun 2011, Bernd Schmidt wrote:
> 
>> This is a fixlet for a problem introduced with the patch that made us
>> set OS/ABI to C6X-specific values. strip and objcopy changed the value
>> back to the default. Ok?
> 
> What happens if you strip a .o file (--strip-debug, say, is a useful case 
> of stripping .o files) with this patch? That shouldn't add an OSABI.

It doesn't. As far as I can tell the input OS/ABI field is used to
select a BFD target vector, so we then preserve it since we use the same
one for the output.

> It would be good to have testcases that 
> verify that strip preserves the OSABI for executables and shared libraries 
> and leaves it unset of .o files - maybe make the existing OSABI tests 
> strip the objects after first testing their OSABI and report the results 
> of testing OSABI after strip as well (with a different test name after 
> PASS or FAIL, of course).

There are some objcopy tests of that sort already in binutils/testsuite;
one of them (the plain objcopy one) would have caught the problem if it
was run for tic6x-uclinux. (Remember our discussion of -uclinux vs
-linux-uclibc? This is one more instance where "-uclinux" is interpreted
to mean "uses crummy flat binaries".)

The patch below enables the extra tests on tic6x-uclinux, and adds some
code to test OS/ABI fields before/after strip.


Bernd

Attachment: bu-osabi.diff
Description: Text document


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