Message ID | 1465322879-30114-1-git-send-email-rth@twiddle.net |
---|---|
State | New, archived |
Headers |
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: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> 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 <rth@twiddle.net> 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> |
Commit Message
Richard Henderson
June 7, 2016, 6:07 p.m. UTC
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(+)
Comments
On 06/07/2016 02:07 PM, Richard Henderson wrote: > 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. ;-) Who defines the e_machine values these days? When does it become final? Before glibc 2.24 is released on August 1st? I'm OK with the change, but worried about a final value.
On Tue, 2016-06-07 at 15:10 -0400, Carlos O'Donell wrote: > On 06/07/2016 02:07 PM, Richard Henderson wrote: > > 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. ;-) > > Who defines the e_machine values these days? Apparently it is still SCO (at least it was a year ago): http://moxielogic.org/blog/elf-machine-number.html " Just send a nice email requesting the number assignment to registry@sco.com and they'll increment their most recent number and add you to the list." But it might be that it moved to registry@uxsglobal.com. That seems to be the last address used on the sysv-gabi mailinglist. If that also doesn't work, then best to ask on the sysv-gabi mailinglist itself generic-abi@googlegroups.com Cheers, Mark
On 06/07/2016 03:41 PM, Mark Wielaard wrote: > On Tue, 2016-06-07 at 15:10 -0400, Carlos O'Donell wrote: >> On 06/07/2016 02:07 PM, Richard Henderson wrote: >>> 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. ;-) >> >> Who defines the e_machine values these days? > > Apparently it is still SCO (at least it was a year ago): > http://moxielogic.org/blog/elf-machine-number.html > " Just send a nice email requesting the number assignment to > registry@sco.com and they'll increment their most recent number and add > you to the list." > > But it might be that it moved to registry@uxsglobal.com. That seems to > be the last address used on the sysv-gabi mailinglist. If that also > doesn't work, then best to ask on the sysv-gabi mailinglist itself > generic-abi@googlegroups.com How did we get a temporary value without knowing who to contact? :}
On Wed, 2016-06-08 at 15:33 -0400, Carlos O'Donell wrote:
> How did we get a temporary value without knowing who to contact? :}
The glibc elf/elf.h file says how to construct one, and rth knows
l33t-speak! :)
/* If it is necessary to assign new unofficial EM_* values,
please
pick large random numbers (0x8523, 0xa7f2, etc.) ... */
#define EM_BPF 0xeb9f
Personally I like rth's suggestion best.
But an "official" number would be fine too of course.
On 06/08/2016 03:43 PM, Mark Wielaard wrote: > On Wed, 2016-06-08 at 15:33 -0400, Carlos O'Donell wrote: >> How did we get a temporary value without knowing who to contact? :} > > The glibc elf/elf.h file says how to construct one, and rth knows > l33t-speak! :) > > /* If it is necessary to assign new unofficial EM_* values, > please > pick large random numbers (0x8523, 0xa7f2, etc.) ... */ > > #define EM_BPF 0xeb9f > > Personally I like rth's suggestion best. > But an "official" number would be fine too of course. If it's an unofficial EM_* value, why check it into glibc upstream? Lets just wait until we get the final value and avoid any problems?
On 08 Jun 2016 16:22, Carlos O'Donell wrote: > On 06/08/2016 03:43 PM, Mark Wielaard wrote: > > On Wed, 2016-06-08 at 15:33 -0400, Carlos O'Donell wrote: > >> How did we get a temporary value without knowing who to contact? :} > > > > The glibc elf/elf.h file says how to construct one, and rth knows > > l33t-speak! :) > > > > /* If it is necessary to assign new unofficial EM_* values, > > please > > pick large random numbers (0x8523, 0xa7f2, etc.) ... */ > > > > #define EM_BPF 0xeb9f > > > > Personally I like rth's suggestion best. > > But an "official" number would be fine too of course. > > If it's an unofficial EM_* value, why check it into glibc upstream? > > Lets just wait until we get the final value and avoid any problems? agreed ... i think we're past the point in general where glibc needs to get early values in order to make progress. -mike
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