libelf: Add REL32 to the list of ignored relocations

Message ID 1528905496-8851-1-git-send-email-thuth@redhat.com
State Accepted
Headers show
Series
  • libelf: Add REL32 to the list of ignored relocations
Related show

Commit Message

Thomas Huth June 13, 2018, 3:58 p.m.
When compiling SLOF with GCC 8.1, I currently get a lot of these errors:

ERROR: Unhandled relocation (A) type 26

Type 26 is the "relative 32-bit" relocation. We can simply ignore it
(like the other relative relocations - REL14, REL24 and REL64) to
shut up these error messages.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 lib/libelf/elf64.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Vivier June 29, 2018, 11:28 a.m. | #1
On 13/06/2018 17:58, Thomas Huth wrote:
> When compiling SLOF with GCC 8.1, I currently get a lot of these errors:
> 
> ERROR: Unhandled relocation (A) type 26
> 
> Type 26 is the "relative 32-bit" relocation. We can simply ignore it
> (like the other relative relocations - REL14, REL24 and REL64) to
> shut up these error messages.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  lib/libelf/elf64.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/libelf/elf64.c b/lib/libelf/elf64.c
> index 37e9c10..775cdee 100644
> --- a/lib/libelf/elf64.c
> +++ b/lib/libelf/elf64.c
> @@ -362,6 +362,7 @@ elf_apply_rela64(void *file_addr, signed long offset, struct rela *relaentry,
>  	 case R_PPC64_TOC16_DS: 	/* (S + A - .TOC) >> 2 */
>  	 case R_PPC64_REL14:
>  	 case R_PPC64_REL24:		/* (S + A - P) >> 2 */
> +	 case R_PPC64_REL32:		/* S + A - P */
>  	 case R_PPC64_REL64:		/* S + A - P */
>  	 case R_PPC64_GOT16_DS:
>  	 case R_PPC64_GOT16_LO_DS:
> 

Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Alexey Kardashevskiy July 2, 2018, 6:24 a.m. | #2
On Fri, 29 Jun 2018 13:28:56 +0200
Laurent Vivier <lvivier@redhat.com> wrote:

> On 13/06/2018 17:58, Thomas Huth wrote:
> > When compiling SLOF with GCC 8.1, I currently get a lot of these errors:
> > 
> > ERROR: Unhandled relocation (A) type 26
> > 
> > Type 26 is the "relative 32-bit" relocation. We can simply ignore it
> > (like the other relative relocations - REL14, REL24 and REL64) to
> > shut up these error messages.
> > 
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > ---
> >  lib/libelf/elf64.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/lib/libelf/elf64.c b/lib/libelf/elf64.c
> > index 37e9c10..775cdee 100644
> > --- a/lib/libelf/elf64.c
> > +++ b/lib/libelf/elf64.c
> > @@ -362,6 +362,7 @@ elf_apply_rela64(void *file_addr, signed long offset, struct rela *relaentry,
> >  	 case R_PPC64_TOC16_DS: 	/* (S + A - .TOC) >> 2 */
> >  	 case R_PPC64_REL14:
> >  	 case R_PPC64_REL24:		/* (S + A - P) >> 2 */
> > +	 case R_PPC64_REL32:		/* S + A - P */
> >  	 case R_PPC64_REL64:		/* S + A - P */
> >  	 case R_PPC64_GOT16_DS:
> >  	 case R_PPC64_GOT16_LO_DS:
> >   
> 
> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
> 


Thanks, applied.

--
Alexey

Patch

diff --git a/lib/libelf/elf64.c b/lib/libelf/elf64.c
index 37e9c10..775cdee 100644
--- a/lib/libelf/elf64.c
+++ b/lib/libelf/elf64.c
@@ -362,6 +362,7 @@  elf_apply_rela64(void *file_addr, signed long offset, struct rela *relaentry,
 	 case R_PPC64_TOC16_DS: 	/* (S + A - .TOC) >> 2 */
 	 case R_PPC64_REL14:
 	 case R_PPC64_REL24:		/* (S + A - P) >> 2 */
+	 case R_PPC64_REL32:		/* S + A - P */
 	 case R_PPC64_REL64:		/* S + A - P */
 	 case R_PPC64_GOT16_DS:
 	 case R_PPC64_GOT16_LO_DS: