diff mbox

elf: Define missing Meta architecture specific relocations

Message ID 20160712015136.588-1-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj July 12, 2016, 1:51 a.m. UTC
---
ChangeLog

2016-07-11   Ross Burton  <ross.burton@intel.com>
             Khem Raj  <raj.khem@gmail.com>

        * elf/elf.h (R_METAG_NONE, R_METAG_NONE): New.


 elf/elf.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Andreas Schwab July 12, 2016, 6:45 a.m. UTC | #1
Khem Raj <raj.khem@gmail.com> writes:

> diff --git a/elf/elf.h b/elf/elf.h
> index b6112d9..053702d 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -3682,6 +3682,11 @@ enum
>  #define R_BPF_NONE		0	/* No reloc */
>  #define R_BPF_MAP_FD		1	/* Map fd to pointer */
>  
> +/* Imagination Meta specific relocations. */
> +
> +#define R_METAG_ADDR32		2	/* 32bit absolute address */
> +#define R_METAG_NONE		3	/* No reloc */

If you add some you need to add all.

Andreas.
Florian Weimer July 12, 2016, 7:35 a.m. UTC | #2
On 07/12/2016 03:51 AM, Khem Raj wrote:
> ---
> ChangeLog
>
> 2016-07-11   Ross Burton  <ross.burton@intel.com>
>              Khem Raj  <raj.khem@gmail.com>
>
>         * elf/elf.h (R_METAG_NONE, R_METAG_NONE): New.

Could you please add a pointer to the source of the data to the commit 
message?

Thanks,
Florian
Khem Raj July 12, 2016, 2:26 p.m. UTC | #3
On Tue, Jul 12, 2016 at 12:35 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 07/12/2016 03:51 AM, Khem Raj wrote:
>>
>> ---
>> ChangeLog
>>
>> 2016-07-11   Ross Burton  <ross.burton@intel.com>
>>              Khem Raj  <raj.khem@gmail.com>
>>
>>         * elf/elf.h (R_METAG_NONE, R_METAG_NONE): New.
>
>
> Could you please add a pointer to the source of the data to the commit
> message?

I was basing this on binutils patch
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=a3c629886c2cdaa6ee89513b64c7f989ba30eba3

and kernel tools (recordmount) also defines these relocations locally
if EM_METAG is not defined
and started to fail after glibc started to define EM_METAG
but not the relocations used there.

So this was primarily to fix this issue. I do not have official
documentation for Meta processor to cite



>
> Thanks,
> Florian
>
diff mbox

Patch

diff --git a/elf/elf.h b/elf/elf.h
index b6112d9..053702d 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -3682,6 +3682,11 @@  enum
 #define R_BPF_NONE		0	/* No reloc */
 #define R_BPF_MAP_FD		1	/* Map fd to pointer */
 
+/* Imagination Meta specific relocations. */
+
+#define R_METAG_ADDR32		2	/* 32bit absolute address */
+#define R_METAG_NONE		3	/* No reloc */
+
 __END_DECLS
 
 #endif	/* elf.h */