[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Patch to support aarch64 relocs
From: |
Jerry James |
Subject: |
[Gcl-devel] Patch to support aarch64 relocs |
Date: |
Fri, 10 Oct 2014 15:59:43 -0600 |
Here are some new reloc types to handle, courtesy of the Fedora toolchain:
--- ./h/elf64_aarch64_reloc.h.orig 2014-09-06 09:45:30.000000000 -0600
+++ ./h/elf64_aarch64_reloc.h 2014-10-10 12:30:00.000000000 -0600
@@ -46,3 +46,12 @@
case R_AARCH64_LDST128_ABS_LO12_NC: /* LD/ST128: (S+A) & 0xff0 */
store_val(where,MASK(12) << 10,((s+a) & 0xff0) << 6);
break;
+ case R_AARCH64_PREL64:
+ store_val(where,~0L,(s+a-p));
+ break;
+ case R_AARCH64_PREL32:
+ store_val(where,MASK(32),(s+a-p));
+ break;
+ case R_AARCH64_PREL16:
+ store_val(where,MASK(16),(s+a-p));
+ break;
Incidentally, maybe you would also be interested in this patch:
--- ./o/sfaslelf.c.orig 2014-09-06 09:45:30.000000000 -0600
+++ ./o/sfaslelf.c 2014-09-06 20:00:00.000000000 -0600
@@ -181,6 +181,7 @@ relocate(Sym *sym1,void *v,ul a,ul start
#include RELOC_H
default:
+ fprintf(stderr, "Unknown reloc type %lu\n", tp);
massert(tp&~tp);
}
I added that one to the Fedora build. When one of the secondary
architecture teams contacts me to tell me that gcl failed to build for
them, they give me a log of the failed build. With this patch in
place, if the build is due to an unhandled reloc type (which it has
been 3 times now), I already have the reloc number. Otherwise, I'd
have to ask them to do a special build, diagnose the failure with gdb,
etc.
Regards,
--
Jerry James
http://www.jamezone.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gcl-devel] Patch to support aarch64 relocs,
Jerry James <=