Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 891210 Details for
Bug 1009601
add support for STT_GNU_IFUNC for armv7hl
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Updated patch with fixed ifunc.h bits
prelink-ifunc-1.diff (text/plain), 7.40 KB, created by
Julian Brown
on 2014-04-30 15:37:57 UTC
(
hide
)
Description:
Updated patch with fixed ifunc.h bits
Filename:
MIME Type:
Creator:
Julian Brown
Created:
2014-04-30 15:37:57 UTC
Size:
7.40 KB
patch
obsolete
>Index: testsuite/ifunc.h >=================================================================== >--- testsuite/ifunc.h (revision 430260) >+++ testsuite/ifunc.h (working copy) >@@ -35,6 +35,25 @@ asm (".text\n" \ > IFUNC_ASM (PICK (fn1, fn2)) \ > "\t.size " #name ", .-" #name "\n") > # endif >+#elif defined __arm__ >+# ifdef __thumb__ >+# define PIPE_OFFSET "4" >+# else >+# define PIPE_OFFSET "8" >+# endif >+# define IFUNC_ASM(fn) \ >+ "\tldr r0, .L" fn "\n" \ >+ "1:\tadd r0, pc, r0\n" \ >+ "\tmov pc, lr\n" \ >+ ".L" fn ": .long " fn " - 1b - " PIPE_OFFSET "\n" >+# define IFUNC_DECL(name, hidden, fn1, fn2) \ >+asm (".text\n" \ >+ "\t.globl " #name "\n" \ >+ "\t" hidden " " #name "\n" \ >+ "\t.type " #name ", %gnu_indirect_function\n" \ >+ #name ":\n" \ >+ IFUNC_ASM (PICK (fn1, fn2)) \ >+ "\t.size " #name ", .-" #name "\n") > #else > # error Architecture not supported > #endif >Index: src/prelink.h >=================================================================== >--- src/prelink.h (revision 430260) >+++ src/prelink.h (working copy) >@@ -181,6 +181,10 @@ typedef uint8_t Elf64_Byte; > #define R_PPC64_IRELATIVE 248 > #endif > >+#ifndef R_ARM_IRELATIVE >+#define R_ARM_IRELATIVE 160 >+#endif >+ > struct prelink_entry; > struct prelink_info; > struct PLArch; >Index: src/arch-arm.c >=================================================================== >--- src/arch-arm.c (revision 430260) >+++ src/arch-arm.c (working copy) >@@ -1,4 +1,4 @@ >-/* Copyright (C) 2001, 2002, 2004, 2009, 2011 Red Hat, Inc. >+/* Copyright (C) 2001, 2002, 2004, 2009, 2011, 2013 Red Hat, Inc. > Written by Jakub Jelinek <jakub@redhat.com>, 2001. > > This program is free software; you can redistribute it and/or modify >@@ -80,6 +80,7 @@ arm_adjust_rel (DSO *dso, GElf_Rel *rel, > { > case R_ARM_RELATIVE: > case R_ARM_JUMP_SLOT: >+ case R_ARM_IRELATIVE: > data = read_une32 (dso, rel->r_offset); > if (data >= start) > write_ne32 (dso, rel->r_offset, data + adjust); >@@ -97,6 +98,7 @@ arm_adjust_rela (DSO *dso, GElf_Rela *re > switch (GELF_R_TYPE (rela->r_info)) > { > case R_ARM_RELATIVE: >+ case R_ARM_IRELATIVE: > if ((Elf32_Addr) rela->r_addend >= start) > { > rela->r_addend += (Elf32_Sword) adjust; >@@ -123,6 +125,7 @@ arm_prelink_rel (struct prelink_info *in > Elf32_Sword val; > > if (GELF_R_TYPE (rel->r_info) == R_ARM_RELATIVE >+ || GELF_R_TYPE (rel->r_info) == R_ARM_IRELATIVE > || GELF_R_TYPE (rel->r_info) == R_ARM_NONE) > /* Fast path: nothing to do. */ > return 0; >@@ -212,6 +215,7 @@ arm_prelink_rela (struct prelink_info *i > Elf32_Sword val; > > if (GELF_R_TYPE (rela->r_info) == R_ARM_RELATIVE >+ || GELF_R_TYPE (rela->r_info) == R_ARM_IRELATIVE > || GELF_R_TYPE (rela->r_info) == R_ARM_NONE) > /* Fast path: nothing to do. */ > return 0; >@@ -293,6 +297,8 @@ static int > arm_apply_conflict_rela (struct prelink_info *info, GElf_Rela *rela, > char *buf, GElf_Addr dest_addr) > { >+ GElf_Rela *ret; >+ > switch (GELF_R_TYPE (rela->r_info)) > { > case R_ARM_GLOB_DAT: >@@ -300,6 +306,16 @@ arm_apply_conflict_rela (struct prelink_ > case R_ARM_ABS32: > buf_write_ne32 (info->dso, buf, rela->r_addend); > break; >+ case R_ARM_IRELATIVE: >+ if (dest_addr == 0) >+ return 5; >+ ret = prelink_conflict_add_rela (info); >+ if (ret == NULL) >+ return 1; >+ ret->r_offset = dest_addr; >+ ret->r_info = GELF_R_INFO (0, R_ARM_IRELATIVE); >+ ret->r_addend = rela->r_addend; >+ break; > default: > abort (); > } >@@ -399,35 +415,31 @@ arm_prelink_conflict_rel (DSO *dso, stru > GElf_Rela *ret; > > if (GELF_R_TYPE (rel->r_info) == R_ARM_RELATIVE >- || GELF_R_TYPE (rel->r_info) == R_ARM_NONE >- || info->dso == dso) >+ || GELF_R_TYPE (rel->r_info) == R_ARM_NONE) > /* Fast path: nothing to do. */ > return 0; > conflict = prelink_conflict (info, GELF_R_SYM (rel->r_info), > GELF_R_TYPE (rel->r_info)); > if (conflict == NULL) > { >- if (info->curtls == NULL) >- return 0; >- > switch (GELF_R_TYPE (rel->r_info)) > { > /* Even local DTPMOD and TPOFF relocs need conflicts. */ > case R_ARM_TLS_DTPMOD32: > case R_ARM_TLS_TPOFF32: >+ if (info->curtls == NULL || info->dso == dso) >+ return 0; >+ break; >+ /* Similarly IRELATIVE relocations always need conflicts. */ >+ case R_ARM_IRELATIVE: > break; >- > default: > return 0; > } > value = 0; > } >- else if (conflict->ifunc) >- { >- error (0, 0, "%s: STT_GNU_IFUNC not handled on ARM yet", >- dso->filename); >- return 1; >- } >+ else if (info->dso == dso && !conflict->ifunc) >+ return 0; > else > { > /* DTPOFF32 wants to see only real conflicts, not lookups >@@ -450,6 +462,11 @@ arm_prelink_conflict_rel (DSO *dso, stru > case R_ARM_GLOB_DAT: > case R_ARM_JUMP_SLOT: > ret->r_addend = (Elf32_Sword) value; >+ if (conflict != NULL && conflict->ifunc) >+ ret->r_info = GELF_R_INFO (0, R_ARM_IRELATIVE); >+ break; >+ case R_ARM_IRELATIVE: >+ ret->r_addend = (Elf32_Sword) read_une32 (dso, rel->r_offset); > break; > case R_ARM_ABS32: > case R_ARM_PC24: >@@ -508,8 +525,7 @@ arm_prelink_conflict_rela (DSO *dso, str > Elf32_Sword val; > > if (GELF_R_TYPE (rela->r_info) == R_ARM_RELATIVE >- || GELF_R_TYPE (rela->r_info) == R_ARM_NONE >- || info->dso == dso) >+ || GELF_R_TYPE (rela->r_info) == R_ARM_NONE) > /* Fast path: nothing to do. */ > return 0; > conflict = prelink_conflict (info, GELF_R_SYM (rela->r_info), >@@ -517,27 +533,24 @@ arm_prelink_conflict_rela (DSO *dso, str > > if (conflict == NULL) > { >- if (info->curtls == NULL) >- return 0; >- > switch (GELF_R_TYPE (rela->r_info)) > { > /* Even local DTPMOD and TPOFF relocs need conflicts. */ > case R_ARM_TLS_DTPMOD32: > case R_ARM_TLS_TPOFF32: >+ if (info->curtls == NULL || info->dso == dso) >+ return 0; >+ break; >+ /* Similarly IRELATIVE relocations always need conflicts. */ >+ case R_ARM_IRELATIVE: > break; >- > default: > return 0; > } > value = 0; > } >- else if (conflict->ifunc) >- { >- error (0, 0, "%s: STT_GNU_IFUNC not handled on ARM yet", >- dso->filename); >- return 1; >- } >+ else if (info->dso == dso && !conflict->ifunc) >+ return 0; > else > { > /* DTPOFF32 wants to see only real conflicts, not lookups >@@ -560,7 +573,10 @@ arm_prelink_conflict_rela (DSO *dso, str > case R_ARM_GLOB_DAT: > case R_ARM_JUMP_SLOT: > case R_ARM_ABS32: >+ case R_ARM_IRELATIVE: > ret->r_addend = (Elf32_Sword) (value + rela->r_addend); >+ if (conflict && conflict->ifunc) >+ ret->r_info = GELF_R_INFO (0, R_ARM_IRELATIVE); > break; > case R_ARM_PC24: > val = value + rela->r_addend - rela->r_offset; >@@ -625,6 +641,7 @@ arm_rel_to_rela (DSO *dso, GElf_Rel *rel > /* We should be never converting .rel.plt into .rela.plt. */ > abort (); > case R_ARM_RELATIVE: >+ case R_ARM_IRELATIVE: > case R_ARM_ABS32: > case R_ARM_TLS_TPOFF32: > case R_ARM_TLS_DTPOFF32: >@@ -656,6 +673,7 @@ arm_rela_to_rel (DSO *dso, GElf_Rela *re > and thus never .rela.plt back to .rel.plt. */ > abort (); > case R_ARM_RELATIVE: >+ case R_ARM_IRELATIVE: > case R_ARM_ABS32: > case R_ARM_TLS_TPOFF32: > case R_ARM_TLS_DTPOFF32: >@@ -794,6 +812,7 @@ arm_undo_prelink_rel (DSO *dso, GElf_Rel > switch (GELF_R_TYPE (rel->r_info)) > { > case R_ARM_RELATIVE: >+ case R_ARM_IRELATIVE: > case R_ARM_NONE: > break; > case R_ARM_JUMP_SLOT:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1009601
:
799487
|
805779
| 891210