From patchwork Mon Feb 20 20:37:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Mezentsev X-Patchwork-Id: 19315 Received: (qmail 860 invoked by alias); 20 Feb 2017 20:37:42 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 851 invoked by uid 89); 20 Feb 2017 20:37:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1721, H*r:8.13.8 X-HELO: userp1040.oracle.com Subject: Fwd: [PATCH] [BZ #21179] - handle R_SPARC_DISP64 and R_SPARC_REGISTER relocs Reply-To: vladimir.mezentsev@oracle.com References: <1487622402-129515-1-git-send-email-vladimir.mezentsev@oracle.com> From: Vladimir Mezentsev To: libc-alpha@sourceware.org X-Forwarded-Message-Id: <1487622402-129515-1-git-send-email-vladimir.mezentsev@oracle.com> Message-ID: <58AB538F.6020106@oracle.com> Date: Mon, 20 Feb 2017 12:37:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1487622402-129515-1-git-send-email-vladimir.mezentsev@oracle.com> On 02/17/2017 01:07 PM, Joseph Myers wrote: > On Fri, 17 Feb 2017, Vladimir Mezentsev wrote: > From: Vladimir Mezentsev > > The Studio compiler generates relocation types which are not supported > in glibc. Handle these relocs. > > Tested in sparc64-linux-gnu. No regressions. > > * sysdeps/sparc/sparc64/dl-machine.h: Handle R_SPARC_DISP64 and > R_SPARC_REGISTER relocations. > Since you filed bug 21179 for this, you need to include [BZ #21179] in the > ChangeLog entry. Done. Can somebody apply my fixes. I don't have write access to the repo. Thank you. -Vladimir From: Vladimir Mezentsev The Studio compiler generates relocation types which are not supported in glibc. Handle these relocs. Tested in sparc64-linux-gnu. No regressions. [BZ #21179] * sysdeps/sparc/sparc64/dl-machine.h: Handle R_SPARC_DISP64 and R_SPARC_REGISTER relocations. --- sysdeps/sparc/sparc64/dl-machine.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 99c00f4..1b59d78 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -537,6 +537,12 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, case R_SPARC_DISP32: *(unsigned int *) reloc_addr = (value - (Elf64_Addr) reloc_addr); break; + case R_SPARC_DISP64: + *reloc_addr = (value - (Elf64_Addr) reloc_addr); + break; + case R_SPARC_REGISTER: + *reloc_addr = value; + break; case R_SPARC_WDISP30: *(unsigned int *) reloc_addr = ((*(unsigned int *)reloc_addr & 0xc0000000) |