Hi Christian,

On Sat, Feb 18, 2017 at 02:19:52PM +0100, Christian Seiler wrote:
[...]
> I believe the issue stems from this code in binutils/bfd:
> 
> http://sources.debian.net/src/binutils/2.27.90.20170218-1/bfd/elflink.c/#L9757-L9778
> 
> The file name at this point is just the argument passed to the linker,
> irrespective of whether it's an absolute path or a relative one, and
> no prefix is applied at all.
> 
> The initial problem with dietlibc is that on ARM paltforms the
> startup code has local symbols in the assembly, which it doesn't
> on x86, so the problem has never surfaced on x86 in the past.
> 
> Which means this is a broader class of bugs that every time one
> has an assembly file that doesn't contain a ".file" directive
> and contains local symbols, ld.bfd will output a FILE entry
> which may contain an absolute path of the object file (depending on
> how the file name was passed to the linker), which can break
> reproducibility.
> 
> 
> For dietlibc (after Stretch), I can just add .file directives
> everywhere, so I can work around this issue.
> 
> But to make sure this doesn't happen at all anymore (there might
> be other software with hand-crafted assembly out there that has
> similar issues), I believe binutils should also be altered to
> support SOURCE_PREFIX_MAP in these cases.
> 
> Unfortunately, I know way too little about the details of binutils
> to feel comfortable in creating a patch (it was hard enough to find
> the suspected place where the path is injected), so all I can do 
> here is report my findings. Hopefully someone with more binutils-fu
> is able to pick this up.

do you know whether this has been fixed in the recent binutils uploads?

if not maybe you can file these findings as a bug, so they don't get lost 
on the mailinglist?


-- 
cheers,
        Holger

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to