public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* AW: [RFH] Howto add new relocation types for avr-elf
@ 2005-10-05 16:39 Haase Bjoern (PT-BEU/EMT) *
  2005-10-06  4:44 ` Ramana Radhakrishnan
  0 siblings, 1 reply; 3+ messages in thread
From: Haase Bjoern (PT-BEU/EMT) * @ 2005-10-05 16:39 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: ramana.radhakrishnan, binutils

>Is there a documented AVR ELF ABI?  For many targets, you need to check
>with someone before adding new ELF numbers.  Possibly not, for AVR.

To my very best knowledge, gcc is the only compiler using elf for the
avr target. So we could probably define the standard ourselves :-).

Bjoern.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AW: [RFH] Howto add new relocation types for avr-elf
  2005-10-05 16:39 AW: [RFH] Howto add new relocation types for avr-elf Haase Bjoern (PT-BEU/EMT) *
@ 2005-10-06  4:44 ` Ramana Radhakrishnan
  0 siblings, 0 replies; 3+ messages in thread
From: Ramana Radhakrishnan @ 2005-10-06  4:44 UTC (permalink / raw)
  To: Haase Bjoern (PT-BEU/EMT) *; +Cc: Daniel Jacobowitz, binutils

On Wed, 2005-10-05 at 18:39 +0200, Haase Bjoern (PT-BEU/EMT) * wrote:
> >Is there a documented AVR ELF ABI?  For many targets, you need to check
> >with someone before adding new ELF numbers.  Possibly not, for AVR.
> 
> To my very best knowledge, gcc is the only compiler using elf for the
> avr target. So we could probably define the standard ourselves :-).

Thats good , but you might want to make sure that if you make such ABI
changes you make the linker barf if it cannot link object files of
different types together.  One option is to use the eflags in the ELF
header for such purposes. 


cheers
Ramana

^ permalink raw reply	[flat|nested] 3+ messages in thread

* AW: [RFH] Howto add new relocation types for avr-elf
@ 2005-10-05 13:24 Haase Bjoern (PT-BEU/EMT) *
  0 siblings, 0 replies; 3+ messages in thread
From: Haase Bjoern (PT-BEU/EMT) * @ 2005-10-05 13:24 UTC (permalink / raw)
  To: ramana.radhakrishnan; +Cc: binutils

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
                                                                        



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-06  4:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-05 16:39 AW: [RFH] Howto add new relocation types for avr-elf Haase Bjoern (PT-BEU/EMT) *
2005-10-06  4:44 ` Ramana Radhakrishnan
  -- strict thread matches above, loose matches on Subject: below --
2005-10-05 13:24 Haase Bjoern (PT-BEU/EMT) *

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).