Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-24 Thread Dave Martin
On Sun, Mar 22, 2015 at 01:56:10AM +0100, Lino Sanfilippo wrote: > On 06.03.2015 19:20, Lino Sanfilippo wrote: > > > >>> > >> > >> Ok, I got a link to the source now. It can be found here: > >> > >> http://tp-lab200/release/gcc/temp/internal/2010q4-113-4.4.5/marvell-gcc.src-2010q4-113.tar.bz2 >

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-21 Thread Lino Sanfilippo
On 06.03.2015 19:20, Lino Sanfilippo wrote: > >>> >> >> Ok, I got a link to the source now. It can be found here: >> >> http://tp-lab200/release/gcc/temp/internal/2010q4-113-4.4.5/marvell-gcc.src-2010q4-113.tar.bz2 >> > > > Sigh. Just realized that the url is not accessible. Will check that o

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-06 Thread Lino Sanfilippo
>> > > Ok, I got a link to the source now. It can be found here: > > http://tp-lab200/release/gcc/temp/internal/2010q4-113-4.4.5/marvell-gcc.src-2010q4-113.tar.bz2 > Sigh. Just realized that the url is not accessible. Will check that on monday. Lino -- To unsubscribe from this list: send the

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-06 Thread Lino Sanfilippo
On 05.03.2015 18:33, Dave Martin wrote: On Thu, Mar 05, 2015 at 04:32:28PM +0100, Lino Sanfilippo wrote: On 05.03.2015 14:47, Dave Martin wrote: Source code? That just looks like binaries to me. Oops, youre right, there is no source in that package, sorry. I tried to contact the persons t

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-05 Thread Dave Martin
On Thu, Mar 05, 2015 at 04:32:28PM +0100, Lino Sanfilippo wrote: > On 05.03.2015 14:47, Dave Martin wrote: > > > > >Source code? That just looks like binaries to me. > > > > Oops, youre right, there is no source in that package, sorry. I > tried to contact the persons that are maintaining this t

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-05 Thread Lino Sanfilippo
On 05.03.2015 14:47, Dave Martin wrote: Source code? That just looks like binaries to me. Oops, youre right, there is no source in that package, sorry. I tried to contact the persons that are maintaining this toolchain and asked for access to the source. Hope I will get a response, soon..

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-05 Thread Dave Martin
On Thu, Mar 05, 2015 at 02:20:43PM +0100, Lino Sanfilippo wrote: > On 05.03.2015 13:26, Dave Martin wrote: > > >> > >>So this is indeed a compiler bug, right? > > > >It certainly looks like the compiler is causing the issue somehow. > > > >Whether this is a bug, a bug-like feature, a configuration

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-05 Thread Lino Sanfilippo
On 05.03.2015 13:26, Dave Martin wrote: So this is indeed a compiler bug, right? It certainly looks like the compiler is causing the issue somehow. Whether this is a bug, a bug-like feature, a configuration issue, or a combination of these is not clear. If you know where to find the toolcha

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-05 Thread Dave Martin
On Wed, Mar 04, 2015 at 05:29:14PM +0100, Lino Sanfilippo wrote: > On 04.03.2015 15:35, Dave Martin wrote: > > > > >Try > > > >rm drivers/clk/mvebu/kirkwood.o > >make ARCH=arm KBUILD_CFLAGS_KERNEL=-save-temps drivers/clk/mvebu/kirkwood.o > > > >(abuse of KBUILD_CFLAGS_KERNEL here, but it's empty b

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-04 Thread Lino Sanfilippo
On 04.03.2015 15:35, Dave Martin wrote: Try rm drivers/clk/mvebu/kirkwood.o make ARCH=arm KBUILD_CFLAGS_KERNEL=-save-temps drivers/clk/mvebu/kirkwood.o (abuse of KBUILD_CFLAGS_KERNEL here, but it's empty by default, and I'm too lazy to copy-paste command lines...) The compiler will split ou

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-04 Thread Dave Martin
On Wed, Mar 04, 2015 at 12:40:34PM +0100, sanfilippo wrote: > On 03.03.2015 15:41, Dave Martin wrote: > > Dave, > > thanks for your response. > > >For the element _size_ issue, I'm confused. On 32-bit, that > >structure is clearly 196 bytes in size, with the alignment requirement > >of void * (

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-04 Thread sanfilippo
On 03.03.2015 15:41, Dave Martin wrote: Dave, thanks for your response. For the element _size_ issue, I'm confused. On 32-bit, that structure is clearly 196 bytes in size, with the alignment requirement of void * (4 bytes)... so there's no clear reason why the linker shouldn't be inserting ex

Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-03 Thread Dave Martin
On Mon, Mar 02, 2015 at 11:01:41AM +0100, Lino Sanfilippo wrote: > > Hi, > > I came across a problem concerning structure alignment on ARM architectures > (in > this case the "clock_provider" struct) when structures are placed by means of > the > "section" compiler attribute. I noticed that wit

[RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section"

2015-03-02 Thread Lino Sanfilippo
Hi, I came across a problem concerning structure alignment on ARM architectures (in this case the "clock_provider" struct) when structures are placed by means of the "section" compiler attribute. I noticed that with a certain cross compiler one byte padding is inserted in between the structures: