This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Do we need assemble_external_libcall?


On Mon, Jan 15, 2007 at 08:23:05PM -0800, Ian Lance Taylor wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
> 
> > > Look at, e.g., mcore_external_libcall in mcore.c, and at
> > > ASM_OUTPUT_EXTERNAL_LIBCALL in i386/cygming.h.  You need to handle
> > > cases like those somehow.  I agree that we could rework the way that
> > > TARGET_ASM_EXTERNAL_LIBCALL works today, but no matter what you still
> > > need some way to refer to an external libcall.
> > 
> > TARGET_ASM_EXTERNAL_LIBCALL is a subset of ASM_OUTPUT_EXTERNAL
> > which is called by assemble_external_real. Why do we need
> > TARGET_ASM_EXTERNAL_LIBCALL when there is ASM_OUTPUT_EXTERNAL?
> 
> In the larger scheme of things, we don't.
> 
> At present, in particular, there are targets which implement
> TARGET_ASM_EXTERNAL_LIBCALL (or ASM_OUTPUT_EXTERNAL_LIBCALL) but don't
> implement ASM_OUTPUT_EXTERNAL, and there are targets which implement
> both but implement them differently.

Many of those targets, if not all, have TARGET_ASM_FILE_END and/or
maintain their own lists of external symbols, which are obsolete
with a properly implemented ASM_OUTPUT_EXTERNAL.

> 
> So any attempt at cleaning this up would have to be done very
> carefully so as to not break anything.

I will open a bug report for enhancement.


H.J.


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