| @@ -414,13 +414,6 @@ is the same as writing · 413 unmodified lines |
| 414 | @end itemize | 414 | @end itemize |
| 415 | | 415 | |
| 416 | @section GNU C extensions | 416 | @section GNU C extensions |
| 417 | @cindex aligned attribute | | |
| 418 | @cindex packed attribute | | |
| 419 | @cindex section attribute | | |
| 420 | @cindex unused attribute | | |
| 421 | @cindex cdecl attribute | | |
| 422 | @cindex stdcall attribute | | |
| 423 | @cindex regparm attribute | | |
| 424 | | 417 | |
| 425 | TCC implements some GNU C extensions: | 418 | TCC implements some GNU C extensions: |
| 426 | | 419 | |
| @@ -454,13 +447,22 @@ instead of · 27 unmodified lines |
| 454 | @} | 447 | @} |
| 455 | @end example | 448 | @end example |
| 456 | | 449 | |
| | 450 | @cindex aligned attribute |
| | 451 | @cindex packed attribute |
| | 452 | @cindex section attribute |
| | 453 | @cindex unused attribute |
| | 454 | @cindex cdecl attribute |
| | 455 | @cindex stdcall attribute |
| | 456 | @cindex regparm attribute |
| | 457 | @cindex dllexport attribute |
| | 458 | |
| 457 | @item The keyword @code{__attribute__} is handled to specify variable or | 459 | @item The keyword @code{__attribute__} is handled to specify variable or |
| 458 | function attributes. The following attributes are supported: | 460 | function attributes. The following attributes are supported: |
| 459 | @itemize | 461 | @itemize |
| 460 | | 462 | |
| 461 | @item @code{aligned(n)}: align a variable or a structure field to n bytes | 463 | @item @code{aligned(n)}: align a variable or a structure field to n bytes |
| 462 | (must be a power of two). | 464 | (must be a power of two). |
| 463 | | 465 | |
| 464 | @item @code{packed}: force alignment of a variable or a structure field to | 466 | @item @code{packed}: force alignment of a variable or a structure field to |
| 465 | 1. | 467 | 1. |
| 466 | | 468 | |
| @@ -478,6 +480,8 @@ section. · 11 unmodified lines |
| 478 | between 1 and 3. The first @var{n} function parameters are respectively put in | 480 | between 1 and 3. The first @var{n} function parameters are respectively put in |
| 479 | registers @code{%eax}, @code{%edx} and @code{%ecx}. | 481 | registers @code{%eax}, @code{%edx} and @code{%ecx}. |
| 480 | | 482 | |
| | 483 | @item @code{dllexport}: export function from dll/executable (win32 only) |
| | 484 | |
| 481 | @end itemize | 485 | @end itemize |
| 482 | | 486 | |
| 483 | Here are some examples: | 487 | Here are some examples: |
| @@ -733,10 +737,13 @@ TCC for Windows supports the native Win32 executable file format (PE-i386). It · 249 unmodified lines |
| 733 | generates both EXE and DLL files. DLL symbols can be imported thru DEF files | 737 | generates both EXE and DLL files. DLL symbols can be imported thru DEF files |
| 734 | generated with the @code{tiny_impdef} tool. | 738 | generated with the @code{tiny_impdef} tool. |
| 735 | | 739 | |
| 736 | Currently TCC for Windows cannot generate nor read PE object files, so ELF | 740 | On the object file level, currently TCC supports only the ELF format, not COFF |
| 737 | object files are used for that purpose. It can be a problem if | 741 | as used by MINGW and MSVC. It is not possible to exchange object files or |
| 738 | interoperability with MSVC is needed. Moreover, no leading underscore is | 742 | libraries between TCC and these compilers. However libraries for TCC from objects |
| 739 | currently generated in the ELF symbols. | 743 | by TCC can be made using the @code{tiny_libmaker} tool or MINGW's @code{ar}. |
| | 744 | |
| | 745 | No leading underscore is generated in the ELF symbols. Only functions (no |
| | 746 | data) can be exported. Bounds checking (@option{-b}) is not supported currently. |
| 740 | | 747 | |
| 741 | @section GNU Linker Scripts | 748 | @section GNU Linker Scripts |
| 742 | @cindex scripts, linker | 749 | @cindex scripts, linker |