From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by sourceware.org (Postfix) with ESMTPS id 656013857350 for ; Wed, 20 Apr 2022 12:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 656013857350 Received: by mail-oo1-xc29.google.com with SMTP id 65-20020a4a1a44000000b00333316787bbso269113oof.3 for ; Wed, 20 Apr 2022 05:45:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=/9nS9W0EtmunVPDq8b77kiHEhCve/nFxUHT+kL5SOJ8=; b=Vur3BoxBr2d9whdsJMVAnC5llORvt4rh/4qBRaqDK1S+dPPkj2EixlKa7pPgIv0eps HvgUikvjaGrEFJtFEnGpW/VYrrPypY6pvqwXScmPsQZg8DJAo8Uec0N4GjBG/SyS+Dur RVDIOYahS5cegdVLsgFDt8ZbwtFXg4B8jDMNIGfufzM+y/4VrWdtBO+Q1OOKGSwAwkA6 GlpCjocmSwHRnLL4ItgVSthAWN7SywyQDScAo7Yj9t93Sp/gK2nfxxY2vJOYz4uxUkIy eOMYZC7pexv7vdw9Xmb71saf0fpPAUQxRMMn9NMHwaovILUZxAiidbwlgOLWEhyZ5EjR vUbw== X-Gm-Message-State: AOAM532IANhUgjfBTAax63tl0gRvxSccQk71RBL82McCXWk+OrNbBswn dciSplvT19ZnVGw1+OEh8CUTDA== X-Google-Smtp-Source: ABdhPJwOLe8XP3PWAwZd+a9kQGMerGqRjtH8id0f5WW2w0vHDACUADkYexcdvFPYEJlpEFiom/XoRg== X-Received: by 2002:a4a:685:0:b0:329:22be:36cf with SMTP id 127-20020a4a0685000000b0032922be36cfmr7043607ooj.37.1650458735354; Wed, 20 Apr 2022 05:45:35 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:c9d0:24b1:bd98:2ef4:714c? ([2804:431:c7ca:c9d0:24b1:bd98:2ef4:714c]) by smtp.gmail.com with ESMTPSA id t6-20020a056870f20600b000e2a451bcaesm6440436oao.17.2022.04.20.05.45.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Apr 2022 05:45:34 -0700 (PDT) Message-ID: <47258bc7-e7cd-1987-facc-d7d83a5f4766@linaro.org> Date: Wed, 20 Apr 2022 09:45:32 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v10 1/7] elf: Define DT_RELR related macros and types Content-Language: en-US To: "H.J. Lu" , libc-alpha@sourceware.org References: <20220414232129.1886210-1-hjl.tools@gmail.com> <20220414232129.1886210-2-hjl.tools@gmail.com> From: Adhemerval Zanella In-Reply-To: <20220414232129.1886210-2-hjl.tools@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2022 12:45:38 -0000 LGTM, thanks. Reviewed-by: Adhemerval Zanella On 14/04/2022 20:21, H.J. Lu wrote: > --- > elf/elf.h | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/elf/elf.h b/elf/elf.h > index 0735f6b579..0195029188 100644 > --- a/elf/elf.h > +++ b/elf/elf.h > @@ -443,7 +443,8 @@ typedef struct > #define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */ > #define SHT_GROUP 17 /* Section group */ > #define SHT_SYMTAB_SHNDX 18 /* Extended section indices */ > -#define SHT_NUM 19 /* Number of defined types. */ > +#define SHT_RELR 19 /* RELR relative relocations */ > +#define SHT_NUM 20 /* Number of defined types. */ > #define SHT_LOOS 0x60000000 /* Start OS-specific. */ > #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */ > #define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */ > @@ -662,6 +663,11 @@ typedef struct > Elf64_Sxword r_addend; /* Addend */ > } Elf64_Rela; > > +/* RELR relocation table entry */ > + > +typedef Elf32_Word Elf32_Relr; > +typedef Elf64_Xword Elf64_Relr; > + > /* How to extract and insert information held in the r_info field. */ > > #define ELF32_R_SYM(val) ((val) >> 8) > @@ -887,7 +893,10 @@ typedef struct > #define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/ > #define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */ > #define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */ > -#define DT_NUM 35 /* Number used */ > +#define DT_RELRSZ 35 /* Total size of RELR relative relocations */ > +#define DT_RELR 36 /* Address of RELR relative relocations */ > +#define DT_RELRENT 37 /* Size of one RELR relative relocaction */ > +#define DT_NUM 38 /* Number used */ > #define DT_LOOS 0x6000000d /* Start of OS-specific */ > #define DT_HIOS 0x6ffff000 /* End of OS-specific */ > #define DT_LOPROC 0x70000000 /* Start of processor-specific */