- Fixup at offset 28: 32 bit offset into symbol table
-
- A 32 bit offset into the symbol table is enough. It allows for symbol
- tables up to a size of 2 gigabyte. A single dynamic object (the main
- program, any shared library) is limited to 4GB in size and I want to see
- the program that manages to have a symbol table of more than 2 GB with a
- total size of at max 4 GB. */
-
-#define PLT_ENTRY_WORD0 (bfd_vma) 0xc0100000
-#define PLT_ENTRY_WORD1 (bfd_vma) 0x0000e310
-#define PLT_ENTRY_WORD2 (bfd_vma) 0x10000004
-#define PLT_ENTRY_WORD3 (bfd_vma) 0x07f10d10
-#define PLT_ENTRY_WORD4 (bfd_vma) 0xe310100c
-#define PLT_ENTRY_WORD5 (bfd_vma) 0x0014c0f4
-#define PLT_ENTRY_WORD6 (bfd_vma) 0x00000000
-#define PLT_ENTRY_WORD7 (bfd_vma) 0x00000000
+ Fixup at offset 28: 32 bit offset into .rela.plt
+
+ A 32 bit offset into the symbol table is enough. It allows for
+ .rela.plt sections up to a size of 2 gigabyte. A single dynamic
+ object (the main program, any shared library) is limited to 4GB in
+ size. Having a .rela.plt of 2GB would already make the .plt
+ section bigger than 8GB. */
+
+static const bfd_byte elf_s390x_plt_entry[PLT_ENTRY_SIZE] =
+ {
+ 0xc0, 0x10, 0x00, 0x00, 0x00, 0x00, /* larl %r1,. */
+ 0xe3, 0x10, 0x10, 0x00, 0x00, 0x04, /* lg %r1,0(%r1) */
+ 0x07, 0xf1, /* br %r1 */
+ 0x0d, 0x10, /* basr %r1,%r0 */
+ 0xe3, 0x10, 0x10, 0x0c, 0x00, 0x14, /* lgf %r1,12(%r1) */
+ 0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00, /* jg first plt */
+ 0x00, 0x00, 0x00, 0x00 /* .long 0x00000000 */
+ };