[help]Creating PLT entries

Andreas Schwab schwab@suse.de
Fri Sep 24 19:27:00 GMT 2004


"C Jaiprakash, Noida" <C.Jaiprakash@noida.hcltech.com> writes:

> Following is part of plt entries table 
> static const bfd_byte elf_m68k_plt0_entry[PLT_ENTRY_SIZE] =
> {
>   0x2f, 0x3b, 0x01, 0x70, /* move.l (%pc,addr),-(%sp) */
>   0, 0, 0, 0,             /* replaced with offset to .got + 4.  */
>   0x4e, 0xfb, 0x01, 0x71, /* jmp ([%pc,addr]) */
>   0, 0, 0, 0,             /* replaced with offset to .got + 8.  */
>   0, 0, 0, 0              /* pad out to 20 bytes.  */
> };
>
> How can i modify this so that instead of jmp ([%pc,addr]) jmp
> ([%pc,reg]) is used. Where should i look for modifications?

Obviously, the array contains the machine code.  Just put the right values
there.  Of course, you also have to change the code that fills in the
offsets.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Binutils mailing list