Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 4 Jan 2021 12:08:06 -0800
From: Fangrui Song <>
Subject: Re: [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 <filename>.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
> captures the nature of the
> problem. You may send a message to 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.