From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65075 invoked by alias); 25 Jun 2018 20:25:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 65066 invoked by uid 89); 25 Jun 2018 20:25:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=HTo:U*macro, H*Ad:U*amodra X-HELO: albireo.enyo.de From: Florian Weimer To: "Maciej W. Rozycki" Cc: , Alan Modra Subject: Re: [PATCH 1/2] elf: Accept absolute (SHN_ABS) symbols whose value is zero [BZ #23307] References: Date: Mon, 25 Jun 2018 20:25:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Mon, 18 Jun 2018 19:07:03 +0100") Message-ID: <87woum3977.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-06/txt/msg00758.txt.bz2 * Maciej W. Rozycki: > --- glibc.orig/elf/dl-lookup.c 2018-06-17 09:06:30.202407070 +0100 > +++ glibc/elf/dl-lookup.c 2018-06-18 18:12:36.138114433 +0100 > @@ -76,6 +76,7 @@ check_match (const char *const undef_nam > unsigned int stt = ELFW(ST_TYPE) (sym->st_info); > assert (ELF_RTYPE_CLASS_PLT == 1); > if (__glibc_unlikely ((sym->st_value == 0 /* No value. */ > + && sym->st_shndx != SHN_ABS > && stt != STT_TLS) > || ELF_MACHINE_SYM_NO_MATCH (sym) > || (type_class & (sym->st_shndx == SHN_UNDEF)))) Context here: unsigned int stt = ELFW(ST_TYPE) (sym->st_info); assert (ELF_RTYPE_CLASS_PLT == 1); if (__glibc_unlikely ((sym->st_value == 0 /* No value. */ && stt != STT_TLS) || ELF_MACHINE_SYM_NO_MATCH (sym) || (type_class & (sym->st_shndx == SHN_UNDEF)))) return NULL; So this looks good. > Index: glibc/elf/tst-absolute-zero-lib.c > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ glibc/elf/tst-absolute-zero-lib.c 2018-06-18 18:12:40.102324540 +0100 > @@ -0,0 +1,25 @@ > +/* BZ #xxxxx absolute zero symbol calculation shared module. Needs Bugzilla number. > Index: glibc/elf/tst-absolute-zero.c > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ glibc/elf/tst-absolute-zero.c 2018-06-18 18:12:40.147611912 +0100 > @@ -0,0 +1,38 @@ > +/* BZ #xxxxx absolute zero symbol calculation main executable. Likewise.