This is the mail archive of the 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]

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 
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 
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 
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 ?

      Tomer Levi

Software Engineer                                   phone: 
CompactRISC Development Tools  fax:        +49-8141-35-11-1378
National Semiconductor GmbH
Livry-Gargan Str. 10                                internet:
82256 Fuerstenfeldbruck, Germany

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