Re: [PATCH] x86_64: fix jiffies ODR violation

2020-06-02 Thread Josh Poimboeuf
On Fri, May 15, 2020 at 11:05:40AM -0700, Bob Haarman wrote: > `jiffies` [...] > `jiffies_64` [...] > ``` > In LLD, symbol assignments in linker scripts override definitions in > object files. GNU ld appears to have the same behavior. It would > probably make sense for LLD to error "duplicate

Re: [PATCH] x86_64: fix jiffies ODR violation

2020-06-01 Thread Bob Haarman
On Mon, May 18, 2020 at 08:17:42PM -0700, Andi Kleen wrote: > > Instead, we can avoid the ODR violation by matching other arch's by > > defining jiffies only by linker script. For -fno-semantic-interposition > > + Full LTO, there is no longer a global definition of jiffies for the > > compiler to

Re: [PATCH] x86_64: fix jiffies ODR violation

2020-05-18 Thread Andi Kleen
> Instead, we can avoid the ODR violation by matching other arch's by > defining jiffies only by linker script. For -fno-semantic-interposition > + Full LTO, there is no longer a global definition of jiffies for the > compiler to produce a local symbol which the linker script won't ensure >

[PATCH] x86_64: fix jiffies ODR violation

2020-05-15 Thread Bob Haarman
`jiffies` and `jiffies_64` are meant to alias (two different symbols that share the same address). Most architectures make the symbols alias to the same address via linker script assignment in their arch//kernel/vmlinux.lds.S: jiffies = jiffies_64; which is effectively a definition of jiffies.