This is the mail archive of the binutils@sourceware.org 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]

[RFH] Howto add new relocation types for avr-elf


Hi,

I have stepped over a problem of the avr port of gas. The issue is that
there are internal structures that are addressed using something that I
interpret to be a "pseudo reloc number". Gas knows how to fixup
relocation structures with these negative number but you cannot generate
a propper relocation in an object file with this relocation index. The
problem is that for proper linker relaxation, one wants *ld* to make
these fixups.

In order to fix this, one probably would have to add new relocation
index defines in the bfd. After reading the code the number system seems
to be centralized.

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
.

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},


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