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 22712 invoked from network); 30 Oct 2020 20:54:33 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 30 Oct 2020 20:54:33 -0000 Received: (qmail 26464 invoked by uid 550); 30 Oct 2020 20:54:31 -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 26437 invoked from network); 30 Oct 2020 20:54:30 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ahcr3o6BLSaAh+mgpDT8cuX5YgIX0eGpArK4yqizOCY=; b=U+Il3WJUavDnXSijcLhP28sDvbpCDakz87/Jg3sVA255YvyFIhrKjkIYZOF0dDFwPl ZL3UEJMXTz7RriMIEqeFxJSkcsdwj+9JeF3IQUwW3lD8/rTrDNj5kPJLiZJuQ/P0W+4t hp7lPUhSCX6128xhfKy5V9U3jo5CUB7KYN0VKs0syLBO/ryBF2FAUiH5G953bM0ollTL 3GWdGKvGi0HW4AxfcjHS6Ytt3QhCcT4RFeG7Pj1u7jD36Iqtju9HZwNRV1XuzrKqZkBv yqyK4c9t1Cla6Xj9lWdutN6eBOr/TwEZY7YOYZJuejv058Vn315m0FCddNmheAKq+oP4 ZK7A== X-Gm-Message-State: AOAM531TgxTdV9QRCqnv5KKpOItqHh9fCthrDCXYQt5hEID+tudIr84w porSU5qD3x17u14+bnV4eNc60XLTT52tmw== X-Google-Smtp-Source: ABdhPJyxNRvmMYkBrTVa6g2eu0DxQfOX7/MrVhzmw4792YRn94n+NOQoWgo53Lj+TwTqfy6BNgharA== X-Received: by 2002:a62:2ce:0:b029:160:77b1:8d60 with SMTP id 197-20020a6202ce0000b029016077b18d60mr11302262pfc.9.1604091258067; Fri, 30 Oct 2020 13:54:18 -0700 (PDT) Date: Fri, 30 Oct 2020 13:54:16 -0700 From: Fangrui Song To: musl@lists.openwall.com Message-ID: <20201030205416.l6mx5gtx6pftz2fw@gmail.com> References: <20201030184402.807422-1-raj.khem@gmail.com> <20201030185016.GD534@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20201030185016.GD534@brightrain.aerifal.cx> Subject: Re: [musl] [PATCH] crt: Add .file directive 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.