This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, avr] Place from avr-libc above other progmem

Hi Senthil,

>   avr-libc's vfprint handling uses a lookup table located in flash
>   if float format specifiers are involved. If user code also has
>   lots of flash data (in section, then
>   avr-libc's progmem data gets pushed beyond the 64 K word limit. The
>   avr-libc code doesn't expect this to happen and vfprintf stops working correctly.

Doesn't this indicate a problem with the linker - in that it does not
report to the user that the code is broken and that accesses above the 64k
limit are being made without use of the memx address space modifier ?

>   User code can easily use the  memx address space modifier to
>   seamlessly access flash data above 64K. The avr-libc project doesn't
>   use address space modifiers yet, and the lookup logic itself is
>   written in assembly, so I guess it is not going to gain this ability
>   soon.

This sounds like a potential long term problem.  If the libc sources are
not being maintained and improved, then things are only going to get worse 
in the long run.

>   Given these constraints, this patch places coming from
>   avr-libc's routines above other, increasing the
>   likelyhood that it gets placed below the 64 K limit. If this is ok,

Sure - it's OK, although it will not help in the situation where the user
is using their own linker scripts...

Also, the new statements should be enclosed in ${RELOCATING+ ... } just
like the other statements in that section.

>   could someone commit please? 


> I don't have commit access.

Would you like to change this ?  You have submitted enough patches now
that it is obvious that you know what you are doing.  So if you would to
apply for commit access (subject to the usual maintainer review of course),
then please fill out the form here.  You can use my name as the approver:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]