diff options
author | marcel <marcel@FreeBSD.org> | 2004-07-20 07:11:14 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-07-20 07:11:14 +0000 |
commit | e8e2b20db98b26aa72d6a72d59a692bce89674fd (patch) | |
tree | d5bbe514d518d4fdb149b04ae7a52e0c01bd7d35 /sys/boot/efi/libefi | |
parent | 9a2c448df915ef4845033ab6e0dd468085c46a7a (diff) | |
download | FreeBSD-src-e8e2b20db98b26aa72d6a72d59a692bce89674fd.zip FreeBSD-src-e8e2b20db98b26aa72d6a72d59a692bce89674fd.tar.gz |
o Support the REL32LSB relocation. It's in the ELF file from which
we construct the EFI image. It doesn't seem to actually end up
in the EFI image, AFAICT.
o Replace .quad, .long and .short with data8, data4 and data2 resp.
The former are gnuisms.
o Redefine _start_plabel as a data16 with @iplt(_start) as its
value. This is the preferred way to create user PLT entries.
Diffstat (limited to 'sys/boot/efi/libefi')
-rw-r--r-- | sys/boot/efi/libefi/arch/ia64/start.S | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/sys/boot/efi/libefi/arch/ia64/start.S b/sys/boot/efi/libefi/arch/ia64/start.S index 643f1c9..5c2f3e1 100644 --- a/sys/boot/efi/libefi/arch/ia64/start.S +++ b/sys/boot/efi/libefi/arch/ia64/start.S @@ -70,6 +70,7 @@ #define R_IA64_FPTR64MSB 0x46 /* word64 MSB @fptr(S + A) */ #define R_IA64_FPTR64LSB 0x47 /* word64 LSB @fptr(S + A) */ #define R_IA64_REL64MSB 0x6e /* word64 MSB BD + A */ +#define R_IA64_REL32LSB 0x6d /* word32 LSB BD + A */ #define R_IA64_REL64LSB 0x6f /* word64 LSB BD + A */ #define R_IA64_IPLTLSB 0x81 /* function descriptor LSB speciaal */ @@ -99,21 +100,19 @@ ENTRY(_start, 2) END(_start) // PLABEL for PE32+ - .global _start_plabel .section .plabel, "a" .align 16 -_start_plabel: - .quad _start - .quad __gp + .global _start_plabel +_start_plabel: + data16 @iplt(_start) .previous // A PE32+ relocation entry for the plabel - .section .reloc, "a" - .long _start_plabel - .long 12 - .short (10 << 12) + 0 - .short (10 << 12) + 8 + data4 _start_plabel + data4 12 + data2 (10 << 12) + 0 + data2 (10 << 12) + 8 .previous // in0: image base @@ -218,6 +217,9 @@ STATIC_ENTRY(_reloc, 2) cmp.eq p6,p0=R_IA64_NONE,r23 (p6) br.cond.dpnt.few 2b ;; + cmp.eq p6,p0=R_IA64_REL32LSB,r23 +(p6) br.cond.dptk.few 3f + ;; cmp.eq p6,p0=R_IA64_REL64LSB,r23 (p6) br.cond.dptk.few 4f ;; @@ -252,6 +254,13 @@ STATIC_ENTRY(_reloc, 2) st8 [r15]=gp // fdesc:GP br.cond.sptk.few 2b + // REL32LSB +3: + add r29=in0,r17 + ;; + st4 [r15]=r29 + br.cond.sptk.few 2b + // REL64LSB 4: add r29=in0,r17 // BD + A |