This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: Fix for alignment of .stab section in sh-pe gas


> : So why are you still suppressing the effect of the -small option?
> 
> Because I do not know what it does and it was not being supported
> before.  If you think it is sensible to add this support to the
> definition of SUB_SEGMENT_ALIGN then I will do so.

-small reduces the alignment of the sections from p2align 4 to p2align 2.
Adding support for it should be as simple as backing out your tc-sh.h patch
from the 24th Febuary.

> No its the former.  The presence of the alignment frags in the .stab
> section upsets the alignment of the section when it is generated later

What do you mean with 'upsets the alignment'?  Is it just that the
alignment gets increased to fit the largest item contained in the section?
Or does it warn that it can't accomodate the larger alignment inside?
Or does it generate an incorrect data layout?

> on.  This is happening because s_stab_generic() in gas/stabs.c is
> calling cons() to read the last part of a stab, which in turn is
> triggering a call to sh_cons_align().

I've seen this.  The cons call is only done for the stabn and stabs cases.
(And a stabd with four arguments... to handle stabd with sh_no_align_cons set,
 the handler function would have to clear sh_no_align_cons set explicitly
 after calling s_stab, since it doesn't know if cons is called or not.)
When sh_cons_align sees that sh_no_align_cons set, it just clears that
variable and returns.

Note that s_xstab can place a stabs entry into a user-selected section.
Although the comment says it's used on Solaris only, there seems to be
nothing that prevents an assembler programmer from using it.
Likewise/ (s)he could put .word stuff into the stabs section.

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