From patchwork Sat Jan 6 07:32:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 25246 Received: (qmail 76233 invoked by alias); 6 Jan 2018 07:32:49 -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 76152 invoked by uid 89); 6 Jan 2018 07:32:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*joseph X-HELO: mail-pl0-f65.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=/Kv9WO7dpLNpCiaroet3u9wyAtmbbWTfXAdnIs02cCY=; b=SkMFMvsl7IJuqDoZJMN7Cm3tHzO3PNo6qQ6xLKatRMjwQ/gt8gWseVum5ZjLsd4Jod rt3ZWJ1NEu3jjX7hhI1NdIT006RyB6MTM+WRbvRUQWixp4I8sTzo9KbGEkHGKFq2qJEN DclxdW6tpBFxGjj0z2jK25QoCtlYajeo07HZuVpF4qzGgWkOhbN7khA90xY8/4LWIg/9 nGf+3eft2xiN1VbXB+xos/XoLIO1XyxWciVe/ZfiJjutJ00qPYV5DH678jIFnDFjwcI2 oHixVcLat0MGD/kYkhbbIHKZ+ceAUqFkt497ydL1z7bSMGuvmMJL/2vEYIHTs6ziYPSl oWKw== X-Gm-Message-State: AKGB3mJBjUr/F85B+FKl9QX+wYNw0RlSxhOqpMVNiSomA3z9RBljasec hhhun/eti878fHtisYL9N5fbig== X-Google-Smtp-Source: ACJfBoviTpftSgfR0IWc+HDdrD/5t2/TFHaQ8mzgOJtQ4LCQO/EyEAnxjy/WzuFsVnw2ziFgwLhxkw== X-Received: by 10.159.202.152 with SMTP id p24mr5585664plo.23.1515223960449; Fri, 05 Jan 2018 23:32:40 -0800 (PST) Subject: [PATCH 1/4] Add RISC-V dynamic relocations to elf.h Date: Fri, 5 Jan 2018 23:32:28 -0800 Message-Id: <20180106073231.20491-2-palmer@dabbelt.com> In-Reply-To: <20180106073231.20491-1-palmer@dabbelt.com> References: <20180106073231.20491-1-palmer@dabbelt.com> Cc: patches@groups.riscv.org, Palmer Dabbelt From: Palmer Dabbelt To: libc-alpha@sourceware.org, joseph@codesourcery.com, schwab@linux-m68k.org These relocations can appear in shared objects on RISC-V ELF systems. --- ChangeLog | 15 +++++++++++++++ elf/elf.h | 14 ++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8833b1da335f..d0e02b0b1f43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2018-01-05 Palmer Dabbelt + + * elf/elf.h (R_RISCV_NONE): New define. + (R_RISCV_32): Likewise. + (R_RISCV_64): Likewise. + (R_RISCV_RELATIVE): Likewise. + (R_RISCV_COPY): Likewise. + (R_RISCV_JUMP_SLOT): Likewise. + (R_RISCV_TLS_DTPMOD32): Likewise. + (R_RISCV_TLS_DTPMOD64): Likewise. + (R_RISCV_TLS_DTPREL32): Likewise. + (R_RISCV_TLS_DTPREL64): Likewise. + (R_RISCV_TLS_TPREL32): Likewise. + (R_RISCV_TLS_TPREL64): Likewise. + 2018-01-06 Samuel Thibault * sysdeps/mach/hurd/i386/jmp_buf-macros.h: New file. diff --git a/elf/elf.h b/elf/elf.h index 01d794601085..031850377bb6 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -3762,6 +3762,20 @@ enum #define R_TILEGX_NUM 130 +/* RISC-V relocations. */ +#define R_RISCV_NONE 0 +#define R_RISCV_32 1 +#define R_RISCV_64 2 +#define R_RISCV_RELATIVE 3 +#define R_RISCV_COPY 4 +#define R_RISCV_JUMP_SLOT 5 +#define R_RISCV_TLS_DTPMOD32 6 +#define R_RISCV_TLS_DTPMOD64 7 +#define R_RISCV_TLS_DTPREL32 8 +#define R_RISCV_TLS_DTPREL64 9 +#define R_RISCV_TLS_TPREL32 10 +#define R_RISCV_TLS_TPREL64 11 + /* BPF specific declarations. */ #define R_BPF_NONE 0 /* No reloc */