From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1644 invoked from network); 4 Jan 2021 20:08:39 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 4 Jan 2021 20:08:39 -0000 Received: (qmail 24218 invoked by uid 550); 4 Jan 2021 20:08:33 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 24197 invoked from network); 4 Jan 2021 20:08:32 -0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KICW1+R6+96ktxkoCF8uoewD0nFwXlZpxovscKreryCyyUKTowlFwqYBoy0YV6aFxqXPQ9T6nuXUie2DSxRUCmtjjgk9upnw+Lc6w7+rn6sYPY7gnh2gA6BADXM2+lpukbY/kiXOSt7eGkSNmJRQTpXGwNw4mPkMmKKXiIKSAymFqmnZ3tJMe7TPZgW1zGqocRmZunXs0rgyVNINalWHYxag8JPkfwxyR5RQ798kbOboWQu+KUxTbXbifitFjyn34HPPpJTljye+4FVdkCr0tWTHbt1vRcublTpoc029T4yq35EOzuuvL2gHxvKPfJctApQ3jSs/Yh1RUJZEXiU1qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FiBL40i80hRwTYoqDd4sEEAhZSXtA0sqVXa3YRBR3VY=; b=ekaNXColHQSq1x4TjgqReCL2cfLLRrHGKTXRJJNq9TKTl94sSb3RHHH2SwnoB6H/hPk+n57j7eK63iLdjjoxb/U+emWlpNtMV7BpBQs5wwQcPYv0177QIpRTf+AHs7aFGBzXEIu5/iihEDy3BoydRx13EGdLv3C6Tc2Da4ljcOvTdPBj6FWYhjLvRU6YVBKc+93mCVjn4+JmUWbOK15GKBoelaMEGTE+tQkOKwSuYFwHfNIP9h0m5Rf/iY7c5m/xDeETPHuyJbThXP9Aww7sPSugOJ/rszARb2ajv68k8bIvUyrqJyJakO5yd89TMRnOJ2btn478HtZAKe8vVZR4/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none X-IncomingTopHeaderMarker: OriginalChecksum:2B789287CBDD82BCD6E30CCBB2C9690E8A76A5E013D3251570FFDE1830BF427E;UpperCasedChecksum:AB187A7220DDE7FC6859A2C80D8664E1408ABD02B41D67CD31C5592FC09C2195;SizeAsReceived:9123;Count:49 X-Gm-Message-State: AOAM530ZEwAQlfEjQyc/juHZ2w+qkrhT5YDtXcgOAIakg7BE4Zz6ohFD X2d5o++CZOc6CwXea0h60DGblt2eBTlmx8lh9RU= X-Google-Smtp-Source: ABdhPJxO+Xre/jX5anqt53KiaGSD8RZkliLplWq1R7gwwoqjktQQqRXkrbTryqvUAmudcIeAhqQ2EkHbWl6kc3tR4N4= X-Received: by 2002:ad4:5762:: with SMTP id r2mr79027881qvx.45.1609790897213; Mon, 04 Jan 2021 12:08:17 -0800 (PST) References: <20201030184402.807422-1-raj.khem@gmail.com> <20201030185016.GD534@brightrain.aerifal.cx> <20201030205416.l6mx5gtx6pftz2fw@gmail.com> In-Reply-To: <20201030205416.l6mx5gtx6pftz2fw@gmail.com> From: Fangrui Song Date: Mon, 4 Jan 2021 12:08:06 -0800 X-Gmail-Original-Message-ID: Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" X-TMN: [1j+ff2qU4VNAoM+PfdR2Z8s25C2Hwh7y] X-ClientProxiedBy: BL1PR13CA0171.namprd13.prod.outlook.com (2603:10b6:208:2bd::26) To MWHPR1201MB0110.namprd12.prod.outlook.com (2603:10b6:301:56::8) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: b33f4883-70d9-4fdd-66cd-08d8b0ec7ae9 X-MS-TrafficTypeDiagnostic: MW2NAM10HT205: X-MS-Exchange-MinimumUrlDomainAge: llvm.org#6141 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e1tgq1g8SLTt1DDde808JtXANULhXmkFH3HpuVc9ICMWUucLbrl3GvzJNHZIAT4w/tjn4QHus/i5t+U0ICxTNZSi9iULxgiwQdhRtmYnMnH4e4Q0AnTJ6Nwre/2LxxGIC1xbh3OmnZaiedHPxRFdIL4FUIDBISEPbLMCeHvZdVqYQPWD9XcUz3+Mitad/CQ5oYp1wntwrpGsglbKFqK2ed+lDFDPGCw6+2MWr94iuRMD7gVpXbjGuJ5T4lAb8bCjYn4ta7x27uuFAyq0T8bbpqf3KOO6E55fUww2Eh4wjD4= X-MS-Exchange-AntiSpam-MessageData: PHjoBqKnehf3UVsnA3Lr57NLbVzKGWWgHfakBTIfkMlSP9rFx0iz6c3wYUkUjz6v8gvwB5oFq90JRctC41d6XNsd6WJ3Kz7qc4HVv+krMXtloacJ/NBQ+OZIGe3CdzafIK8PdQ9rM+2N15yGgP7QnQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2021 20:08:19.2722 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-Network-Message-Id: b33f4883-70d9-4fdd-66cd-08d8b0ec7ae9 X-MS-Exchange-CrossTenant-AuthSource: MW2NAM10FT047.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM10HT205 Subject: Re: [musl] [PATCH] crt: Add .file directive On Fri, Oct 30, 2020 at 1:54 PM Fangrui Song wrote: > > On 2020-10-30, Rich Felker wrote: > >On Fri, Oct 30, 2020 at 11:44:02AM -0700, Khem Raj wrote: > >> Musl linked binaries come out to be not reproducible because > >> absolute build path is seen in debug info of crti.o and crtn.o > >> This is due to the fact that these objects are built from assembly > >> source files and they are missing .file directive > >> if we add .file .s in them then debug info encodes this > >> value instead of absolute path in debug_line section > > .debug_line is unrelated because there is no .loc directive in these > crti.s and crtn.s files. > > Many architectures do not leave non-STT_SECTION STB_LOCAL symbols in > crti.o and crtn.o, so they don't need to be patched (even if the > maintainer agrees to add the workaround in musl, instead of fixing the > toolchain). > > >Surely there should be some better way to achieve this with CFLAGS > >instead of duplication across every source file..? > > > >Rich > > https://bugs.llvm.org/show_bug.cgi?id=48023 captures the nature of the > problem. You may send a message to binutils@sourceware.org how GCC/gas > should handle this situation. > > LLD and gold do not synthesize STT_FILE, hence no such problem. The binutils action is: GNU ld 2.36 will use the base name (https://sourceware.org/bugzilla/show_bug.cgi?id=26822)