This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Fw: New port: CRX
- From: "Tomer Levi" <Tomer dot Levi at nsc dot com>
- To: nickc at redhat dot com
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 8 Jul 2004 10:33:42 +0200
- Subject: Fw: New port: CRX
Hi Nick,
> There are a couple of features which I hope that you will be submitting
> in the future:
> * Support in GAS for evaluating the difference between two symbols
> which are defined in the same section. (Lack of this support is causing
> 3 unexpected failures in the GAS testsuite).
Actually, i added this kind of support (originally for switch tables),
but then left it outside the patch, since i haven't tested it heavily.
It seems to me that LD should do most of the work, since the difference
between
two symbols is like to change due to Linker's relaxation.
I have decided to attack this problem as following (haven't found another
architecture that do the same) :
*** GAS forces a relocation entry for such cases and saves the difference
as an Addend.
*** When LD deletes some bytes from a section while relaxing (function
'*_relax_delete_bytes'),
it adjusts the symbols defined in this section. If the address (from where
we delete the bytes) is between
the two symbols, the difference between the symbols (that is, the Addend)
is updated accordingly.
*** When relocation is performed (function '*__final_link_relocate'), the
Addend is written to file.
I've tested this on switch tables, where the code between two subtracted
symbols
was relaxed (hence reduced), and it seems to work fine.
Are you familiar with simpler ways to deal with this problem ?
And before i finish, a technical question for you :
Do i need to get your (that is, Binutils people) approval for changes made
in my port,
or am i permitted to commit them freely, and only send a patch to the
Binutils mailing-list ?
Regards,
Tomer Levi
Software Engineer phone:
+49-8141-35-1378
CompactRISC Development Tools fax: +49-8141-35-11-1378
National Semiconductor GmbH mailto:Tomer.Levi@nsc.com
Livry-Gargan Str. 10 internet:
http://www.national.com
82256 Fuerstenfeldbruck, Germany