User Tools

Site Tools


go:internals:textflag

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
go:internals:textflag [2019/03/04 10:48] – created fgmgo:internals:textflag [2020/11/23 17:23] (current) – external edit 127.0.0.1
Line 18: Line 18:
 In "cc" C, add a ''pragma'' directive before the function definition -- example: In "cc" C, add a ''pragma'' directive before the function definition -- example:
  
-''+<code c>
 #pragma textflag 7 #pragma textflag 7
 void void
Line 25: Line 25:
     //...     //...
 } }
-''+</code>
  
 In "asm" assembly, put the number ''7'' in function's entry point definition line -- example: In "asm" assembly, put the number ''7'' in function's entry point definition line -- example:
  
-''+<code asm>
 TEXT runtime·tstart(SB),7,$0 TEXT runtime·tstart(SB),7,$0
-''+</code>
  
 Note: These C and assembly syntaxes are supported only by the C compilers and assemblers shipped with Go (i.e. the modified [[http://doc.cat-v.org/plan_9/4th_edition/papers/compiler|Plan 9 ones]]). Stock ''Gcc'' does not have the ability to set these flags (but maybe a ''Gcc'' with ''gccgo'' integrated in it can?) Note: These C and assembly syntaxes are supported only by the C compilers and assemblers shipped with Go (i.e. the modified [[http://doc.cat-v.org/plan_9/4th_edition/papers/compiler|Plan 9 ones]]). Stock ''Gcc'' does not have the ability to set these flags (but maybe a ''Gcc'' with ''gccgo'' integrated in it can?)
  
go/internals/textflag.1551696500.txt.gz · Last modified: 2020/11/23 17:23 (external edit)