NO

Author Topic: POCC stdcalls decoration  (Read 8270 times)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
POCC stdcalls decoration
« on: November 04, 2004, 02:01:46 PM »
Hi Pelle,
I just installed the last revision and I had a problem with the symbol's decoration in __stdcall functions. The compiler switch to avoid decoration doesn't work, and there is no way to remove them. This makes impossible to call __stdcall functions from assembler (unless you provide decoration on the assembler side, that is not supported in all assemblers).
Of course the version 2.80 of the compiler works fine.
Regards
F.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POCC stdcalls decoration
« Reply #1 on: November 05, 2004, 11:30:14 AM »
Hello,

The -Gn option was only meant to provide a simpler way to export undecorated symbols. Version 2.80 was buggy, since it tried to undecorate *all* __stdcall symbols, which caused problems -for example- when trying to call __stdcall symbols from import libraries (with decorated names). This have been fixed in 2.90.

If you want *all* __stdcall symbols to be undecorated, I guess I have to add a new options for that. It makes no sense in the 'C' world, but I understand it can be useful in the 'assembly' world.

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
POCC stdcalls decoration
« Reply #2 on: November 08, 2004, 12:39:47 PM »
Hello Pelle,
actually I (and people that use your compiler system as well for low level or OS independent code that mixes C and assembler) cannot use the last version of compiler.
As I immagine your are interested in that your compiler could be used in any application field I think you should provide a switch to undecorate **all** symbols to allow such a large applicability.
Moreover should you no more support symbols undecoration all sw already write could no more be mantained or modified unless using old 2.80.
Thank you
Regards
F.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POCC stdcalls decoration
« Reply #3 on: November 08, 2004, 01:02:41 PM »
Have you looked at 2.90.1 ??????

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
POCC stdcalls decoration
« Reply #4 on: November 08, 2004, 02:07:26 PM »
Sorry Pelle,
but I don't have such a release (I just collected 2.90.11 and the actual 2.90.17).
Where can I get it?
Regards
F.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
POCC stdcalls decoration
« Reply #5 on: November 08, 2004, 02:37:12 PM »
You find it here right now (use the new -Gm option):
http://smorgasbordet.com/phpBB2/viewtopic.php?t=225

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
POCC stdcalls decoration
« Reply #6 on: November 08, 2004, 03:23:24 PM »
Ok Pelle,
thanks, the new switc /Gm works fine, only optimization with switch /Ox has problem in my code (I get a triple fault in CPU). I'll check as soon I can what's the reason and let you know. Optimization with /Os works.
Regards
F.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline Vortex

  • Member
  • *
  • Posts: 797
    • http://www.vortex.masmcode.com
POCC stdcalls decoration
« Reply #7 on: November 09, 2004, 06:41:28 PM »
Hi frankie,

Which is the assembler you are using currently?
Code it... That's all...

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
POCC stdcalls decoration
« Reply #8 on: November 10, 2004, 11:11:38 AM »
Hi Vortex
I generally use nasm.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline Vortex

  • Member
  • *
  • Posts: 797
    • http://www.vortex.masmcode.com
POCC stdcalls decoration
« Reply #9 on: November 10, 2004, 05:33:09 PM »
Hi frankie,

Nasm, can it use internally decorated names?
Code it... That's all...

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
POCC stdcalls decoration
« Reply #10 on: November 11, 2004, 12:41:17 PM »
Hi Vortex,
I don't think the netwide assembler use these gadgets, anyway there will be always another compiler or assembler that don't use them making difficult the mixed language programming.
I.e. MS suggest to modify the .def file for libraries to create aliases for symbols where you don't want decoration, introducing some kind of manual work on compilink/linking process, and only useful for dll's.
So it's better to have the option to remove them, and moreover could be useful to have switch that avoid the undescore decoration for C symbols, in this case with the __stdcall attribute and capital letters name a function is perfectly PASCAL compatible.
Regards
F.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide