File tree 5 files changed +21
-9
lines changed
5 files changed +21
-9
lines changed Original file line number Diff line number Diff line change
1
+ // Smoke test/example demonstrating accessing global variables and functions from a self compiled library.
1
2
package main
2
3
3
4
import (
Original file line number Diff line number Diff line change
1
+ // Example using libpcap to read packets from a networkdevice and decode them with gopacket.
1
2
package main
2
3
3
4
import (
Original file line number Diff line number Diff line change
1
+ /*
2
+ Package fakecgo fakes necessary functionality to support calling C-code (TLS initialization for main thread and subsequent threads).
3
+
4
+ Usage
5
+
6
+ Just import this library with
7
+ import _ "github.com/notti/nocgo/fakecgo"
8
+ and enjoy the side effects (e.g., you can't use cgo any longer) :)
9
+ */
1
10
package fakecgo
2
11
3
12
import (
Original file line number Diff line number Diff line change 1
- // This binary can rewrite static (go) binaries to include interp and use symbols from dynamic libraries
2
- // Symbols must be name symbol name__dynload
3
-
1
+ // [not needed] Relink rewrites static (go) binaries to include interp and use symbols from dynamic libraries.
2
+ //
3
+ // Symbols must be named <symbol name>__dynload
4
4
package main
5
5
6
6
import (
Original file line number Diff line number Diff line change
1
+ // Test generator and tests
1
2
package main
2
3
3
4
import (
@@ -118,13 +119,13 @@ func (a Arguments) Value() string {
118
119
}
119
120
120
121
type Test struct {
121
- Name string
122
- Ret Value
123
- Arguments Arguments
124
- CgoPre , CgoPost string
122
+ Name string
123
+ Ret Value
124
+ Arguments Arguments
125
+ CgoPre , CgoPost string
125
126
NOCGOPre , NOCGOPost string
126
- Bench bool
127
- Multitest bool
127
+ Bench bool
128
+ Multitest bool
128
129
}
129
130
130
131
func (t Test ) NOCGO () string {
You can’t perform that action at this time.
0 commit comments