This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
AW: [RFH] Howto add new relocation types for avr-elf
- From: "Haase Bjoern (PT-BEU/EMT) *" <Bjoern dot Haase at de dot bosch dot com>
- To: <ramana dot radhakrishnan at codito dot com>
- Cc: <binutils at sourceware dot org>
- Date: Wed, 5 Oct 2005 15:24:32 +0200
- Subject: AW: [RFH] Howto add new relocation types for avr-elf
Thank's for your reply.
Would I be adding the new relocations at the end of the list in order to maintain the numbers of the present enums or would I be adding a new enum in the "avr-block" in reloc.c and the corresponding header? I assume I would add a new enum at the end.?
Bjoern.
-----Ursprüngliche Nachricht-----
Von: Ramana Radhakrishnan [mailto:ramana.radhakrishnan@codito.com]
Gesendet: Mittwoch, 5. Oktober 2005 15:05
An: Haase Bjoern (PT-BEU/EMT) *
Cc: binutils@sourceware.org
Betreff: Re: [RFH] Howto add new relocation types for avr-elf
Hi,
Replies inline below.
>
> I'd appreciate comments on how to introduce these new relocation indices
>
> BFD_RELOC_AVR_HLO8_LDI_NEG
> BFD_RELOC_AVR_HHI8_LDI_NEG
> BFD_RELOC_AVR_HLO8_LDI
> BFD_RELOC_AVR_HHI8_LDI
I am really not aware of the AVR ABI / Relocation types and have not
spent time looking at your relaxations patch. However to add BFD
relocations this is what you need to do .
You would have to make the changes in reloc.c , do a make headers after
configuring bfd with --enable-maintainer mode . If you are planning to
add new ELF relocation types , these would be R_AVR_* then the changes
need to go into include/elf/avr.h .
Ofcourse Remember to provide a mapping between the BFD reloc types and
R_AVR in bfd/elf32-avr.c (a quick look at the sources reveals
avr_reloc_map to have this mapping. )
HTH
cheers
Ramana
> .
>
> Yours,
>
> Bjoern
>
> P.S.: The definitions causing the problems are:
>
> {"hlo8", -BFD_RELOC_AVR_LO8_LDI, -BFD_RELOC_AVR_LO8_LDI_NEG, 0},
> {"hhi8", -BFD_RELOC_AVR_HI8_LDI, -BFD_RELOC_AVR_HI8_LDI_NEG, 0},
>
--
Ramana Radhakrishnan
GNU Tools,
codito ergo sum (http://www.codito.com)
Office:+91 20 26051367 ext. 162 Mobile:+91 9890040009