NO

Author Topic: Extra leading underscore issue  (Read 3174 times)

Online Vortex

  • Member
  • *
  • Posts: 862
    • http://www.vortex.masmcode.com
Extra leading underscore issue
« on: April 12, 2024, 09:17:57 PM »
Hello,

Assembling the following code and examining the symbols in the object file :

Code: [Select]
calc PROTO :QWORD,:QWORD,:QWORD,:QWORD,:QWORD,:QWORD

GetResult PROTO :QWORD,:QWORD

ALIAS <calc>=<?calc@formula@@QEAAHHHHHH@Z>
ALIAS <GetResult>=<?GetResult@formula@@QEAAXH@Z>

Code: [Select]
\PellesC\bin\podump.exe /symbols Test.obj
Code: [Select]
Dump of test.obj

File type: OBJ

SYMBOL TABLE
0000 00000000 UNDEF  notype      external     | _?calc@formula@@QEAAHHHHHH@Z
0001 00000000 UNDEF  notype      weak external | calc
     alternate index 0000, search alias
0003 00000000 UNDEF  notype      external     | _?GetResult@formula@@QEAAXH@Z
0004 00000000 UNDEF  notype      weak external | GetResult
     alternate index 0003, search alias

The two symbols should not be prepended with an underscore according to the fastcall calling convention.
Code it... That's all...