[PATCH, Take 2] Gold: Added R_ARM_ABS8 relocation unit test

Viktor Kutuzov vkutuzov@accesssoftek.com
Tue Sep 29 23:30:00 GMT 2009


Hello Ian,

Thank you for the feedback.

I wasn't able to build that assembler code for ARM with the TOT binutils.
Errors about BFD_RELOC_8_PCREL representation in that object file format.

However, I think I see your point and it looks like it is simpler than my approach.
I'll add the R_ARM_ABS16 relocation and will extend the unit tests for it.
I would also like to have overflows checked as well. So, if you would not mind I'll add this cases to the script.

How does the R_ARM_GOT_PREL look? I didn't find a nice generic way to test it as target independent.
Is it Ok to have it tested  as platform dependent?

>  I don't understand your check_relocation_abs test.

It checked the relocation to be in comply with the spec. The script actually calculates the relocation value using symbol address, 
addend and such from the object file and compares the result with the one produced by the gold.

Best regards,
Viktor

----- Original Message ----- 
From: "Ian Lance Taylor" <iant@google.com>
To: "Viktor Kutuzov" <vkutuzov@accesssoftek.com>
Cc: <binutils@sourceware.org>
Sent: Sunday, September 27, 2009 12:34 AM
Subject: Re: [PATCH, Take 2] Gold: Added R_ARM_ABS8 relocation unit test


> Viktor Kutuzov <vkutuzov@accesssoftek.com> writes:
>
>> Please find attached the updated patch for the R_ARM_ABS8 relocation unit test.
>
> I appreciate all the hard work you've done here, but this doesn't seem
> like the right approach to me.
>
> For standard relocations like 8-bit absolute we can write a reasonably
> standard test.  We don't need to write a target dependent test.
>
> I think we can make these tests more robust by using special section
> names.
>
> I don't understand your check_relocation_abs test.  As far as I can
> tell, what it tests is that the final value of a symbol is the value
> in the object file plus the offset of the section in the executable.
> It doesn't seem to test the relocation value.
>
> What I'm thinking is something along the lines of the appended,
> although that is incomplete.
>
> Ian
>
>
> 



More information about the Binutils mailing list