Changeset 95829 in vbox for trunk/include
- Timestamp:
- Jul 26, 2022 11:13:28 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asmdefs.mac
r93115 r95829 126 126 %endmacro 127 127 128 ;; 129 ; Empty define 130 %define RT_NOTHING 128 131 129 132 ;; Define ASM_FORMAT_PE64 if applicable. … … 483 486 ;; 484 487 ; Global marker which is DECLASM() compatible. 485 %macro GLOBALNAME_EX 2 486 %ifndef ASM_FORMAT_BIN 487 %ifdef ASM_FORMAT_ELF 488 global NAME(%1):%2 489 %else 488 ; 489 ; @param %1 The symbol name - subjected to NAME(). 490 ; @param %2 ELF and PE attributes: 'function', 'object', 'data', 'notype'. 491 ; PE ignores all but 'function' (yasm only). Other formats ignores 492 ; this completely. 493 ; @param %3 Symbol visibility: 'hidden', 'protected', 'internal', and 494 ; RT_NOTHING (for 'default' visibility). 495 ; These are ELF attributes, but 'hidden' is translated to 496 ; 'private_extern' for the Macho-O format. 497 ; Ignored by other formats. 498 ; 499 %macro GLOBALNAME_EX 3 500 %ifdef ASM_FORMAT_ELF 501 global NAME(%1):%2 %3 502 503 %elifdef ASM_FORMAT_PE 504 %ifidn %2,function 505 %ifdef __YASM__ ; nasm does not support any attributes, it errors out. So, nasm is no good with control flow guard atm. 506 global NAME(%1):function 507 %else 490 508 global NAME(%1) 491 %endif 492 %endif 509 %endif 510 %else 511 global NAME(%1) 512 %endif 513 514 %elifdef ASM_FORMAT_MACHO 515 %ifidn %3,hidden 516 global NAME(%1):private_extern 517 %else 518 global NAME(%1) 519 %endif 520 521 %elifndef ASM_FORMAT_BIN 522 global NAME(%1) 523 524 %endif 525 493 526 NAME(%1): 494 527 %endmacro … … 496 529 ;; 497 530 ; Global exported marker which is DECLASM() compatible. 531 ; 532 ; @param %1 The symbol name - subjected to NAME(). 533 ; @param %2 ELF and PE attributes: 'function', 'object', 'data', 'notype'. 534 ; PE ignores all but 'function' (yasm only). Other formats ignores 535 ; this completely. 536 ; 498 537 %macro EXPORTEDNAME_EX 2 499 538 %ifdef ASM_FORMAT_PE … … 505 544 %endif 506 545 %endif 507 GLOBALNAME_EX %1, %2 546 GLOBALNAME_EX %1, %2, RT_NOTHING 508 547 %endmacro 509 548 … … 518 557 proc_frame NAME(%1) 519 558 %else 520 GLOBALNAME_EX %1, function hidden559 GLOBALNAME_EX %1, function, hidden 521 560 %endif 522 561 .start_of_prologue: … … 547 586 endproc_frame 548 587 %endif 549 GLOBALNAME_EX %1 %+ _EndProc, function hidden588 GLOBALNAME_EX %1 %+ _EndProc, , hidden ; no function here, this isn't a valid code flow target. 550 589 %ifdef ASM_FORMAT_ELF 551 590 %ifndef __NASM__ ; nasm does this in the global directive.
Note:
See TracChangeset
for help on using the changeset viewer.