On Tue, 2019-02-26 at 23:34 +0100, Hauke Mehrtens wrote:
> 
> 
> Paul Fertser did some further analysis of this problem and we can now
> reproduce it also on normal x86 systems when the binary is compiled like
> this:
> CFLAGS=" -Os -flto" LDFLAGS=" -flto" make
> 
> -O3 or -Os and link time optimization is needed to see this problem.
> 
> With LTO the compiler randomly reorders the __section_* variables
> including __section_set and __section_get and that leads to wrong offset
> used to traverse the __cmd section.

Yes, looks like stuff going into the __cmd section is no longer
guaranteed to be in the same order as in the files, which sort of makes
sense. Therefore, the trick I used to determine how densely the linker
packs this no longer works.

However, we can use the same trick with a different section, so I've
just committed a fix for this.

johannes

Reply via email to