Re: gcc: Thumb interworking and weakly linked functions

2012-02-24 Thread Aneesh V
On Thursday 23 February 2012 07:26 PM, Richard Earnshaw wrote: On 23/02/12 10:27, Aneesh V wrote: Ok. Agree. I never used to use %function when I wrote assembly functions earlier. I am sure a lot of code will break if this was enforced. If you've not used %function on ARM, then your code is se

Re: gcc: Thumb interworking and weakly linked functions

2012-02-24 Thread Aneesh V
On Thursday 23 February 2012 05:17 PM, Ulrich Weigand wrote: Aneesh V wrote on 23.02.2012 11:27:40: The "packed" attribute specifies that all struct elements ought to be considered to have alignment requirement 1 instead of their default alignment. Thus the whole struct ends up having alignme

Re: gcc: Thumb interworking and weakly linked functions

2012-02-23 Thread Richard Earnshaw
On 23/02/12 10:27, Aneesh V wrote: > Ok. Agree. I never used to use %function when I wrote assembly > functions earlier. I am sure a lot of code will break if this was > enforced. If you've not used %function on ARM, then your code is semantically broken even if it isn't syntactically broken. The

Re: gcc: Thumb interworking and weakly linked functions

2012-02-23 Thread Ulrich Weigand
Aneesh V wrote on 23.02.2012 11:27:40: > > The "packed" attribute specifies that all struct elements ought to be > > considered to have alignment requirement 1 instead of their default > > alignment. Thus the whole struct ends up having alignment requirement 1; > > and since the section contains

Re: gcc: Thumb interworking and weakly linked functions

2012-02-23 Thread Aneesh V
On Tuesday 21 February 2012 03:27 PM, Dave Martin wrote: On Mon, Feb 20, 2012 at 06:59:53PM +0100, Ulrich Weigand wrote: "V, Aneesh" wrote: I agree that not marking the assembly functions ' %function' is a problem in the code, so it's not a critical bug. But I would've been happier if the lin

Re: gcc: Thumb interworking and weakly linked functions

2012-02-23 Thread Aneesh V
Oops! Sorry. These mails skipped my Inbox and went into a sub-folder in my mail client that I hadn't used for a long time. I didn't realize that I had mails! On Monday 20 February 2012 11:29 PM, Ulrich Weigand wrote: "V, Aneesh" wrote: I agree that not marking the assembly functions ' %functi

Re: gcc: Thumb interworking and weakly linked functions

2012-02-21 Thread Dave Martin
On Tue, Feb 21, 2012 at 12:05:54PM +0100, Ulrich Weigand wrote: > Andrew Stubbs wrote on 21.02.2012 11:56:07: > > > I'm not sure, but I believe that the compiler requires (prefers) any > > structs that you want included inside packed structs to be themselves > > packed, so you can end up with som

Re: gcc: Thumb interworking and weakly linked functions

2012-02-21 Thread Ulrich Weigand
Andrew Stubbs wrote on 21.02.2012 11:56:07: > I'm not sure, but I believe that the compiler requires (prefers) any > structs that you want included inside packed structs to be themselves > packed, so you can end up with some structs with apparently unnecessary > attributes on them. I don't see w

Re: gcc: Thumb interworking and weakly linked functions

2012-02-21 Thread Andrew Stubbs
On Tue 21 Feb 2012 09:57:12 GMT, Dave Martin wrote: struct pad_conf_entry { u16 offset; u16 val; } __attribute__ ((packed)); The "packed" attribute specifies that all struct elements ought to be considered to have alignment requirement 1 instead of their default alignment.

Re: gcc: Thumb interworking and weakly linked functions

2012-02-21 Thread Dave Martin
On Mon, Feb 20, 2012 at 06:59:53PM +0100, Ulrich Weigand wrote: > "V, Aneesh" wrote: > > > I agree that not marking the assembly functions ' %function' is a problem > > in the code, so it's not a critical bug. But I would've been happier if > > the linker refused to link it rather than branching

Re: gcc: Thumb interworking and weakly linked functions

2012-02-20 Thread Ulrich Weigand
"V, Aneesh" wrote: > I agree that not marking the assembly functions ' %function' is a problem > in the code, so it's not a critical bug. But I would've been happier if > the linker refused to link it rather than branching with the wrong > instruction. Isn't that a problem? Well, if the target s

Re: gcc: Thumb interworking and weakly linked functions

2012-02-19 Thread V, Aneesh
+ linaro-toolchain Hello Ulrich, I want to revisit this old thread. Sorry for the sloppy follow-up. But, this time around I have more data. On Tue, Mar 15, 2011 at 9:00 PM, Ulrich Weigand wrote: > Aneesh V wrote: > >> I was trying to build u-boot in Thumb2 for OMAP4. Everything was fine >> un