From patchwork Tue Jun 7 18:07:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12865 Received: (qmail 3356 invoked by alias); 7 Jun 2016 18:08:35 -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 3347 invoked by uid 89); 7 Jun 2016 18:08:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:966, chances, 261, 7, 2616 X-HELO: mail-pa0-f68.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=k4cj8ZwvT8OR1314w/UnwF68fi5GkRI4fQgidscBw6c=; b=NMKer7I06ziyHllG1Y6vVf207S+sOTl3jFy09Sa7vn1UBpeibAZDEl6HGp7VuA6x08 UuNlHhp4sDIMmJk4Z2TyPG4eLspoXVpVYkdT/VQtVPV4LVBWIhqQXvhUzHle4t5ikl6u MiFlpnipXqjJyRsG6Ilsa5tU0eLXv70YJahtzpz1pGGdkkJYtspRqM/ovX6b2No6Myv+ DGCR3lXwpMegijt5uSxq6Q8u57QFN2DHQankEAEp9gMXt9s5Yw+31wCXCnqS9QF+tXbd AyvdhoaCvdVjz5PCAq8FXwyDmi1mWKBgcPPqPhQV5antJ0m86qB5ncMVhAsOc76ckQEs Pu9Q== X-Gm-Message-State: ALyK8tJAy1Bt7kccBzrQc7NMTB5q3zrtRo7t25Rj+yMkS4oxZivxcvDjKXQ1/xqOlC9m4g== X-Received: by 10.66.122.175 with SMTP id lt15mr706949pab.51.1465322911315; Tue, 07 Jun 2016 11:08:31 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: hsowa@redhat.com, mjw@redhat.com Subject: [PATCH] elf: Add declarations for BPF Date: Tue, 7 Jun 2016 11:07:59 -0700 Message-Id: <1465322879-30114-1-git-send-email-rth@twiddle.net> The e_machine value is provisionary, but will serve for now. I want to use this value in elfutils and systemtap. I will also propagate the value to llvm and their bpf backend. The R_BPF_MAP_FD value is being used by llvm, although they are using the name R_X86_64_64, which is perhaps less than ideal. ;-) r~ * elf/elf.h (EM_BPF): New. (R_BPF_NONE, R_BPF_MAP_FD): New. --- elf/elf.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/elf/elf.h b/elf/elf.h index ce96bd5..2db03c3 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -261,6 +261,7 @@ typedef struct chances of collision with official or non-GNU unofficial values. */ #define EM_ALPHA 0x9026 +#define EM_BPF 0xeb9f /* Legal values for e_version (version). */ @@ -3566,6 +3567,10 @@ enum #define R_TILEGX_NUM 130 +/* BPF specific declarations. */ + +#define R_BPF_NONE 0 /* No reloc */ +#define R_BPF_MAP_FD 1 /* Map fd to pointer */ __END_DECLS