From patchwork Sat Aug 7 05:12:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fangrui Song X-Patchwork-Id: 44603 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F6D33838023 for ; Sat, 7 Aug 2021 05:12:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F6D33838023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628313157; bh=2c/J+O8VK5vwF/qvZN/FwBbWUAEr/beIZIal5y4x0Go=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=wGcMlAU3qO4dA4WESVYZ56rMe1EJ4av372goc87/PohELW6AREhU51mx40PVCvAet TCRv9Pe+sj3Ib7Y+xGSKIDawBnKRWIy6s8Kw8IEUfL/wRGJlD6H/WCTvJ0vA4ok6wp oTT4+L54PKgCJp6XO5LEyZjloWFl0RriZd+jwWh0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by sourceware.org (Postfix) with ESMTPS id 4A2B2385503E for ; Sat, 7 Aug 2021 05:12:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4A2B2385503E Received: by mail-qk1-x749.google.com with SMTP id p16-20020a05620a22b0b02903ca40d6cc81so2525771qkh.13 for ; Fri, 06 Aug 2021 22:12:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=2c/J+O8VK5vwF/qvZN/FwBbWUAEr/beIZIal5y4x0Go=; b=LXCjhCfUghWzwboot+LE4nyqJLxQomXsPOPEPlWT0p8eZiGUjNp8vxdylAFV36DFCX hden0/dv/h1Lgbs5Kn35xz0nDO4GHuDIYqO0mgyWivHHCErVzU2JI7B7LUcwo7v50nPp PfQfLObQn7+P3fLjDmniRHoMeQ5HIIz/aIYREYZtUhjNNymqB7/29B1CRicGHlrfBuQY Jw8LJdoGCkTVsDht/4hMhgh4hBlueqBZWeaP0inG4DFe21ENVsG1nxoG1IycQc0MskNX 1GaOxlX4oSIEQvdPFLoTSipqE7lgnthAdY3zVFKBe6702tX3xFgWrgeWNdtuaG1OxYoI Kxfw== X-Gm-Message-State: AOAM533+uhEPttgEdmyY4QyhRY2h0Dk0Bdtbwl/h5OqPna5HbA739xjm XHN+zh+LAQ0oQmL9XjoK8RBjvuTWHxZ7n1gRxVvrC0pwjtXuDoDp/hktCHJX0i+owsSE1Qk5Kvg GQ/mwh8HT9oHhZ2QGnl/FBbsjiQmQ5NnGWjzhpxvLBz/xorOr07jKu5fGJvFLclTR0lDb X-Google-Smtp-Source: ABdhPJzeOd0ozihZ+3tye7N7QGMzgujSXiikNGXDeJZD1KmPRZ3zM2DPdSdRwW/h5lilX6ZwKPCvhP7SeqTX X-Received: from maskray1.svl.corp.google.com ([2620:15c:2ce:200:6d69:ec51:238e:4db2]) (user=maskray job=sendgmr) by 2002:a05:6214:da5:: with SMTP id h5mr14365080qvh.19.1628313134788; Fri, 06 Aug 2021 22:12:14 -0700 (PDT) Date: Fri, 6 Aug 2021 22:12:11 -0700 Message-Id: <20210807051211.1018349-1-maskray@google.com> Mime-Version: 1.0 Subject: [PATCH] elf: Delete obsoleted DISTINGUISH_LIB_VERSIONS To: libc-alpha@sourceware.org X-Spam-Status: No, score=-19.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL 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-Patchwork-Original-From: Fangrui Song via Libc-alpha From: Fangrui Song Reply-To: Fangrui Song Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" and its only definition in i386/dl-librecon.h which essentially hasn't been updated since 2004. --- elf/rtld.c | 4 ---- sysdeps/unix/sysv/linux/i386/dl-librecon.h | 25 ---------------------- 2 files changed, 29 deletions(-) diff --git a/elf/rtld.c b/elf/rtld.c index d733359eaf..4196bae703 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1637,10 +1637,6 @@ dl_main (const ElfW(Phdr) *phdr, if (main_map->l_ld == NULL) _exit (1); - /* We allow here some platform specific code. */ -#ifdef DISTINGUISH_LIB_VERSIONS - DISTINGUISH_LIB_VERSIONS; -#endif _exit (has_interp ? 0 : 2); } diff --git a/sysdeps/unix/sysv/linux/i386/dl-librecon.h b/sysdeps/unix/sysv/linux/i386/dl-librecon.h index 7efe0679b3..e4d90529b8 100644 --- a/sysdeps/unix/sysv/linux/i386/dl-librecon.h +++ b/sysdeps/unix/sysv/linux/i386/dl-librecon.h @@ -21,31 +21,6 @@ #include -#define DISTINGUISH_LIB_VERSIONS \ - do \ - { \ - /* We have to find out whether the binary is linked against \ - libc 5 or glibc. We do this by looking at all the DT_NEEDED \ - entries. If one is libc.so.5 this is a libc 5 linked binary. */ \ - if (main_map->l_info[DT_NEEDED]) \ - { \ - /* We have dependencies. */ \ - const ElfW(Dyn) *d; \ - const char *strtab; \ - \ - strtab = (const char *) D_PTR (main_map, l_info[DT_STRTAB]); \ - \ - for (d = main_map->l_ld; d->d_tag != DT_NULL; ++d) \ - if (d->d_tag == DT_NEEDED \ - && strcmp (strtab + d->d_un.d_val, "libc.so.5") == 0) \ - break; \ - \ - /* We print a `5' or `6' depending on the outcome. */ \ - _dl_printf (d->d_tag != DT_NULL ? "5\n" : "6\n"); \ - } \ - } \ - while (0) - /* Recognizing extra environment variables. */ #define EXTRA_LD_ENVVARS \ case 15: \