Skip to content

Commit 005b747

Browse files
committed
Update examples/singleapp/static_linked_binary
1 parent 842a855 commit 005b747

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
app.dynamic
2-
app.static
2+
app.static*
33
static_linked_binary

examples/singleapp/static_linked_binary/Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@ dynamiclinked:
1010
go build -o app.dynamic
1111

1212
staticlinked:
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

1516
showinfo:
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

1921
lddinfo:
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

2326
execdynamic:
2427
@echo '[exec] app.dynamic: '; sudo chroot . ./app.dynamic || :
2528

2629
execstatic:
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 || :

0 commit comments

Comments
 (0)