[RFC-3] Handle GPC specific name for main function
Adriaan van Os
gpc at microbizz.nl
Thu Sep 27 09:39:24 CEST 2007
Pierre Muller wrote:
> Based on comments from Waldek and concerns from Joel,
> I propose that we first check for the presence of the
> '_p_initialize' minimal symbol, and only look for
> '_p_M0_main_program' and 'pascal_main_program'
> if the '_p_initialize' was found.
The check should certainly not be for _p_M0_main_program or pascal_main_program'. Waldek rightly
remarked that e.g. shared libraries won't have these symbols. Better is to look for _p_initialize
and/or GPC_RTS_VERSION_YYYYMMDD.
> This should reduce substantially the risks of false
> catches.
> Joel, does this seem enough for you, or should we really insist
> on checking if the program was compiled by gcc, like Waldek also
> suggested, but which would mean that only programs
> having debug information present would get a chance of being detected
> correctly, while the present patch also works for
> programs without debugging information.
For compatibility with some bintools even FPC emits 'gcc2_compiled' (on Linux, I believe).
Regards,
Adriaan van Os
More information about the Gpc
mailing list