This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

Re: Marking ia64 psABI conformance (Re: PATCH: Support the .note.GNU-property section)


On Thu, Jun 05, 2003 at 10:32:19AM -0700, Jim Wilson wrote:
> Wouldn't it be easier to just fix the IA-64 gcc port to be ABI compliant?
> 
> There are two issues here
> 1) We need to restore gp in epilogue in some cases where we currently do 
> not.  This is a correctness issue.
> 2) We can optimize away gp save/restore around calls functions in the 
> same load module.  This is an optimization.
> 
> The first one does not cause any ABI problems.  The second one does, and 
> can only be implemented after the first one.
> 
> So a possible solution is to implement the first change now, wait a year 
> or two, and then implement the second one.  After the second change, we 
> can document that the next version of gcc is ABI incompatible with older 
> linux releases.  There will be 3 or 4 version numbers between 
> incompatible versions, so this shouldn't be a fatal problem.  We could 
> even add an option to disable the optimization for people that need 
> compatibility.  Of course, this requires long term planning which we 
> aren't very good at.
> 

Thanks for your comment. The goal of my proposal is to help to do
what you have suggested. The problem my propoal is trying to address
is, even if we fix gcc to preserve gp, but there is no way to tell if
a .o file generated by gcc is ABI conforming or not. For a function
with hidden/internal/protected visibility, gcc can do optimization you 
suggested in 2) since the function will be in the same load module.
But it isn't safe without knowing if a .o file is ABI conforming or
not. With my proposal, the .o files generated by ABI conforming
compiler will have the NT_GNU_PROPETRTY_IA_64_PRESERVE_GP set and
the linker can use it to detect the possible run-time failure and
issue a warning.


H.J.


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