File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
examples/singleapp/static_linked_binary Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11app.dynamic
2- app.static
2+ app.static *
33static_linked_binary
Original file line number Diff line number Diff line change @@ -10,18 +10,22 @@ dynamiclinked:
1010 go build -o app.dynamic
1111
1212staticlinked :
13- CGO_ENABLED=0 go build -o app.static
13+ CGO_ENABLED=0 go build -o app.static1
14+ go build -tags osusergo,netgo -o app.static2
1415
1516showinfo :
1617 @echo ' [info] app.dynamic: ' ; file app.dynamic | tr , ' \n' | grep -F ' linked'
17- @echo ' [info] app.static: ' ; file app.static | tr , ' \n' | grep -F ' linked'
18+ @echo ' [info] app.static1: ' ; file app.static1 | tr , ' \n' | grep -F ' linked'
19+ @echo ' [info] app.static2: ' ; file app.static2 | tr , ' \n' | grep -F ' linked'
1820
1921lddinfo :
2022 @echo ' [ldd ] app.dynamic: ' ; ldd app.dynamic || :
21- @echo ' [ldd ] app.static: ' ; ldd app.static || :
23+ @echo ' [ldd ] app.static1: ' ; ldd app.static1 || :
24+ @echo ' [ldd ] app.static2: ' ; ldd app.static2 || :
2225
2326execdynamic :
2427 @echo ' [exec] app.dynamic: ' ; sudo chroot . ./app.dynamic || :
2528
2629execstatic :
27- @echo ' [exec] app.static: ' ; sudo chroot . ./app.static || :
30+ @echo ' [exec] app.static1: ' ; sudo chroot . ./app.static1 || :
31+ @echo ' [exec] app.static2: ' ; sudo chroot . ./app.static2 || :
You can’t perform that action at this time.
0 commit comments