From patchwork Fri Feb 17 17:26:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Mezentsev X-Patchwork-Id: 19287 Received: (qmail 129691 invoked by alias); 17 Feb 2017 17:26:57 -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 129678 invoked by uid 89); 17 Feb 2017 17:26:56 -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=H*UA:45.2.0, H*u:45.2.0, 1.7.1 X-HELO: userp1040.oracle.com Subject: [PATCH] sparc: elf: handle R_SPARC_DISP64 and R_SPARC_REGISTER relocs Reply-To: vladimir.mezentsev@oracle.com References: <1487283626-123877-1-git-send-email-vladimir.mezentsev@oracle.com> To: libc-alpha@sourceware.org Cc: toolchain-patches_ww_grp@oracle.com From: Vladimir Mezentsev X-Forwarded-Message-Id: <1487283626-123877-1-git-send-email-vladimir.mezentsev@oracle.com> Message-ID: Date: Fri, 17 Feb 2017 09:26:42 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1487283626-123877-1-git-send-email-vladimir.mezentsev@oracle.com> 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. --- 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) |