public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Add NT_GNU_PROPERTY_TYPE_0 macros
Date: Fri, 18 Aug 2017 15:26:00 -0000	[thread overview]
Message-ID: <CAMe9rOrh25B-4HNRqDW89ug-9HQ1prSsTD7=PrJAeDY2t6kjhQ@mail.gmail.com> (raw)
In-Reply-To: <20170815120453.GA10491@gmail.com>

On Tue, Aug 15, 2017 at 5:04 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> Add macros used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0).
>
> Any comments or objections?

I will check it today.

> H.J.
> --
>         * elf/elf.h (NT_GNU_PROPERTY_TYPE_0): New.
>         (NOTE_GNU_PROPERTY_SECTION_NAME): Likewise.
>         (GNU_PROPERTY_STACK_SIZE): Likewie.
>         (GNU_PROPERTY_NO_COPY_ON_PROTECTED): Likewie.
>         (GNU_PROPERTY_LOPROC): Likewise.
>         (GNU_PROPERTY_HIPROC): Likewise.
>         (GNU_PROPERTY_LOUSER): Likewise.
>         (GNU_PROPERTY_HIUSER): Likewise.
>         (GNU_PROPERTY_X86_ISA_1_USED): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_NEEDED): Likwise.
>         (GNU_PROPERTY_X86_FEATURE_1_AND): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_486): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_586): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_686): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_SSE): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_SSE2): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_SSE3): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_SSSE3): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_SSE4_1): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_SSE4_2): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX2): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX512F): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX512CD): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX512ER): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX512PF): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX512VL): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX512DQ): Likwise.
>         (GNU_PROPERTY_X86_ISA_1_AVX512BW): Likwise.
>         (GNU_PROPERTY_X86_FEATURE_1_IBT): Likwise.
>         (GNU_PROPERTY_X86_FEATURE_1_SHSTK): Likwise.
> ---
>  elf/elf.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 56 insertions(+)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 3900b4c9f0..237e35c096 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -1247,6 +1247,62 @@ typedef struct
>  /* Version note generated by GNU gold containing a version string.  */
>  #define NT_GNU_GOLD_VERSION    4
>
> +/* Program property.  */
> +#define NT_GNU_PROPERTY_TYPE_0 5
> +
> +/* Note section name of program property.   */
> +#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
> +
> +/* Values used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0).  */
> +
> +/* Stack size.  */
> +#define GNU_PROPERTY_STACK_SIZE                        1
> +/* No copy relocation on protected data symbol.  */
> +#define GNU_PROPERTY_NO_COPY_ON_PROTECTED      2
> +
> +/* Processor-specific semantics, lo */
> +#define GNU_PROPERTY_LOPROC                    0xc0000000
> +/* Processor-specific semantics, hi */
> +#define GNU_PROPERTY_HIPROC                    0xdfffffff
> +/* Application-specific semantics, lo */
> +#define GNU_PROPERTY_LOUSER                    0xe0000000
> +/* Application-specific semantics, hi */
> +#define GNU_PROPERTY_HIUSER                    0xffffffff
> +
> +/* The x86 instruction sets indicated by the corresponding bits are
> +   used in program.  Their support in the hardware is optional.  */
> +#define GNU_PROPERTY_X86_ISA_1_USED            0xc0000000
> +/* The x86 instruction sets indicated by the corresponding bits are
> +   used in program and they must be supported by the hardware.   */
> +#define GNU_PROPERTY_X86_ISA_1_NEEDED          0xc0000001
> +/* X86 processor-specific features used in program.  */
> +#define GNU_PROPERTY_X86_FEATURE_1_AND         0xc0000002
> +
> +#define GNU_PROPERTY_X86_ISA_1_486             (1U << 0)
> +#define GNU_PROPERTY_X86_ISA_1_586             (1U << 1)
> +#define GNU_PROPERTY_X86_ISA_1_686             (1U << 2)
> +#define GNU_PROPERTY_X86_ISA_1_SSE             (1U << 3)
> +#define GNU_PROPERTY_X86_ISA_1_SSE2            (1U << 4)
> +#define GNU_PROPERTY_X86_ISA_1_SSE3            (1U << 5)
> +#define GNU_PROPERTY_X86_ISA_1_SSSE3           (1U << 6)
> +#define GNU_PROPERTY_X86_ISA_1_SSE4_1          (1U << 7)
> +#define GNU_PROPERTY_X86_ISA_1_SSE4_2          (1U << 8)
> +#define GNU_PROPERTY_X86_ISA_1_AVX             (1U << 9)
> +#define GNU_PROPERTY_X86_ISA_1_AVX2            (1U << 10)
> +#define GNU_PROPERTY_X86_ISA_1_AVX512F         (1U << 11)
> +#define GNU_PROPERTY_X86_ISA_1_AVX512CD                (1U << 12)
> +#define GNU_PROPERTY_X86_ISA_1_AVX512ER                (1U << 13)
> +#define GNU_PROPERTY_X86_ISA_1_AVX512PF                (1U << 14)
> +#define GNU_PROPERTY_X86_ISA_1_AVX512VL                (1U << 15)
> +#define GNU_PROPERTY_X86_ISA_1_AVX512DQ                (1U << 16)
> +#define GNU_PROPERTY_X86_ISA_1_AVX512BW                (1U << 17)
> +
> +/* This indicates that all executable sections are compatible with
> +   IBT.  */
> +#define GNU_PROPERTY_X86_FEATURE_1_IBT         (1U << 0)
> +/* This indicates that all executable sections are compatible with
> +   SHSTK.  */
> +#define GNU_PROPERTY_X86_FEATURE_1_SHSTK       (1U << 1)
>
>  /* Move records.  */
>  typedef struct
> --
> 2.13.5
>



-- 
H.J.

      reply	other threads:[~2017-08-18 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 12:04 H.J. Lu
2017-08-18 15:26 ` H.J. Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOrh25B-4HNRqDW89ug-9HQ1prSsTD7=PrJAeDY2t6kjhQ@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).