Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2002-08

.hidden PASCALMAIN

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sergey Korshunoff

Hi!

Sirs!
Please try to mark PASCALMAIN symbol in FPC generated *.o as hidden! I think you can find more general way to do this then my

   if tai_symbol(hp).sym.name = 'PASCALMAIN' then
      AsmWriteLn('.hidden PASCALMAIN');

(in compiler/aggas.pas only).

This marking is needed to allow link FPC made *.lib with FPC main program.

Because currently FPC 1.1 is heavely corrected in
code generation part there is good time to impement this task too (as I think).

Regards,
Sergey Korshunoff

Reply by email

Peter Vreman
to Sergey Korshunoff
Show quoted text 5 lines
Please try to mark PASCALMAIN symbol in FPC generated *.o as hidden! I think you can find more general way to do this then my if tai_symbol(hp).sym.name = 'PASCALMAIN' then AsmWriteLn('.hidden PASCALMAIN'); (in compiler/aggas.pas only).

How shall it be done in the other assemblers?

Reply by email

Peter Vreman
to Sergey Korshunoff: Hi! Sirs! Please try to mark PASCALMAIN symbol in FPC generated *.o as hidden! I think…
you wrote 15 lines
Hi! Sirs! Please try to mark PASCALMAIN symbol in FPC generated *.o as hidden! I think you can find more general way to do this then my if tai_symbol(hp).sym.name = 'PASCALMAIN' then AsmWriteLn('.hidden PASCALMAIN'); (in compiler/aggas.pas only). This marking is needed to allow link FPC made *.lib with FPC main program. Because currently FPC 1.1 is heavely corrected in code generation part there is good time to impement this task too (as I think).

Is removing the PASCALMAIN symbol from the library also enough? Because then the symbol will only be defined by the program and not by any libaries

Peter

Reply by email

Sergey Korshunoff
to Peter Vreman
Show quoted text 19 lines
>Sirs! >Please try to mark PASCALMAIN symbol in FPC generated *.o as hidden! >I think you can find more general way to do this then my > if tai_symbol(hp).sym.name = 'PASCALMAIN' then > AsmWriteLn('.hidden PASCALMAIN'); >(in compiler/aggas.pas only). > >This marking is needed to allow link FPC made *.lib with >FPC main program. > >Because currently FPC 1.1 is heavely corrected in >code generation part there is good time to impement this >task too (as I think). Is removing the PASCALMAIN symbol from the library also enough? Because then the symbol will only be defined by the program and not by any libaries Peter

Marking PASCALMAIN as hidden acts as removing
this symbol from library. But only after making this library. I do not know how can it be done without marking this symbol as hidden.
Because we need to perform a linking a *.o files inside library before we can
remove PASCALMAIN from the library.

Regards,
Sergey Korshunoff

Reply by email

Sergey Korshunoff
Show quoted text 13 lines
> Is removing the PASCALMAIN symbol from the library also > enough? Because > then the symbol will only be defined by the program and not > by any libaries > Peter Marking PASCALMAIN as hidden acts as removing this symbol from library. But only after making this library. I do not know how can it be done without marking this symbol as hidden. Because we need to perform a linking a *.o files inside library before we can remove PASCALMAIN from the library.

Another solution is an including of strartup asm code in Main library or program asm code. With public symbols removed (which are included for linking a startup asm and main part). Or perform linking of this parts itself (with removing public Symbols as PASCALMAIN after this).

Regards,
Sergey Korshunoff

Reply by email