Re: ELF R_AVR_13_PCREL Relocation
Dylan McKay <[email protected]>
| Newsgroups | gmane.comp.hardware.avr.gcc |
|---|---|
| Message-ID | <CAHAccTPjcmwFMGJV11Oj_3RpYX3vpP5+1HGiXvD1KDvMcCL_WA@mail.gmail.com> |
In `binutils/bfd/elf32-avr.c`, the line that actually computes the relocation: `x = (x & 0xf000) | (srel & 0xfff);` Is only modifying bits in the `0xfff` mask, a total of 12 bits. This makes it seem even more strange. On Thu, Feb 19, 2015 at 3:11 PM, Dylan McKay <[email protected]> wrote: > Hello, > > I'm working on a port <https://github.com/avr-llvm/llvm> of LLVM for AVR. > I am currently adding AVR support to the linker, but I have a question > about something that seems strange. > > This relocation is solely for the relative `jmp` and `call` instructions > (if I'm not mistaken). > > Both of these instructions have exactly 12 bits for their target address. > Why is the relocation 13 bits then? > > Thanks, > Dylan > _______________________________________________ AVR-GCC-list mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-gcc-list