From: Tom H. <to...@co...> - 2018-03-16 17:29:31
|
On 16/03/18 17:16, John Reiser wrote: > On 03/16/2018 1439 UTC, Zack Weinberg wrote: >> On Fri, Mar 16, 2018 at 1323 UTC, John Reiser wrote: >>> >>> The code 0x67 0xE8 0x7D 0xFF is "addr32 callq ...". Valgrind is >>> complaining >>> about the 'addr32' opcode prefix. The compiler for locale_init.cc did a >>> not-so-good job. The addr32 prefix is a total waste; remove it. >> >> This _could_ be an alignment hack. I don't see any of these prefixes >> in my copy of libstdc++ but the compiler could plausibly be trying to >> make the instruction right after the call be on a tidy address >> boundary. > > The 0x67 was at 0x48cc63d which is (-3 mod 16), so the following > instruction > is at (+3 mod 16) [1 for the 0x67, 1 for the 0xE8, 4 for the 32-bit > displacement]. > Alignment was not close to any auspicious boundary. We figured out the cause on IRC and it's all down to this: https://sourceware.org/ml/binutils/2016-05/msg00322.html Basically code compiled with -fno-plt causes the linker to do it when it needs to patch an indirect call without changing the length of the instruction. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |