elf.h: add relocations for Imagination META

Message ID 1468332939-11584-1-git-send-email-ross.burton@intel.com
State New, archived
Headers

Commit Message

Ross Burton July 12, 2016, 2:15 p.m. UTC
  Adding EM_METAG but not the relocations means the kernel doesn't compile as it
guards its own declarations on the presence of EM_METAG.
---
 ChangeLog | 5 +++++
 elf/elf.h | 4 ++++
 2 files changed, 9 insertions(+)
  

Comments

Florian Weimer July 13, 2016, 12:36 p.m. UTC | #1
On 07/12/2016 04:15 PM, Ross Burton wrote:
> Adding EM_METAG but not the relocations means the kernel doesn't compile as it
> guards its own declarations on the presence of EM_METAG.

There's already a thread for this change:

   <https://sourceware.org/ml/libc-alpha/2016-07/msg00331.html>

We are currently blocked on having an authoritative source for the new 
constants.  It would be great if you could help out there.

Thanks,
Florian
  
Will Newton July 13, 2016, 12:52 p.m. UTC | #2
On Wed, Jul 13, 2016 at 1:36 PM, Florian Weimer <fweimer@redhat.com> wrote:
> On 07/12/2016 04:15 PM, Ross Burton wrote:
>>
>> Adding EM_METAG but not the relocations means the kernel doesn't compile
>> as it
>> guards its own declarations on the presence of EM_METAG.
>
>
> There's already a thread for this change:
>
>   <https://sourceware.org/ml/libc-alpha/2016-07/msg00331.html>
>
> We are currently blocked on having an authoritative source for the new
> constants.  It would be great if you could help out there.

binutils can be considered the authoritative source for these
constants (and the patch matches the values there).
  

Patch

diff --git a/ChangeLog b/ChangeLog
index af245d9..ba45b1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@ 
+2016-07-12  Ross Burton  <ross.burton@intel.com>
+
+	* elf/elf.h (R_METAG_NONE, R_METAG_NONE): Add Imagination META
+	relocations.
+
 2016-07-12  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #20309]
diff --git a/elf/elf.h b/elf/elf.h
index b6112d9..1034812 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -3682,6 +3682,10 @@  enum
 #define R_BPF_NONE		0	/* No reloc */
 #define R_BPF_MAP_FD		1	/* Map fd to pointer */
 
+/* Imagination META relocations */
+#define R_METAG_ADDR32		2
+#define R_METAG_NONE		3
+
 __END_DECLS
 
 #endif	/* elf.h */