This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFH] Howto add new relocation types for avr-elf
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at codito dot com>
- To: "Haase Bjoern (PT-BEU/EMT) *" <Bjoern dot Haase at de dot bosch dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 05 Oct 2005 18:35:15 +0530
- Subject: Re: [RFH] Howto add new relocation types for avr-elf
- References: <D3C486BA1A1825409E44B17E8FA629600334BF89@si-mail06.de.bosch.com>
- Reply-to: ramana dot radhakrishnan at codito dot com
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