mirror of
https://github.com/containers/buildah.git
synced 2026-02-06 03:45:19 +01:00
internal/mkcw/embed/entrypoint.gz: rename to include the arch
Include the arch in the name of the static entrypoint binary, in case we find ourselves needing to support other architectures in the same area in the future. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
7
Makefile
7
Makefile
@@ -69,15 +69,14 @@ static:
|
||||
mkdir -p ./bin
|
||||
cp -rfp ./result/bin/* ./bin/
|
||||
|
||||
bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint.gz
|
||||
bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz
|
||||
$(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah
|
||||
|
||||
ifneq ($(shell as --version | grep x86_64),)
|
||||
internal/mkcw/embed/entrypoint.gz: internal/mkcw/embed/entrypoint
|
||||
$(RM) $@
|
||||
internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64
|
||||
gzip -k9nf $^
|
||||
|
||||
internal/mkcw/embed/entrypoint: internal/mkcw/embed/entrypoint.s
|
||||
internal/mkcw/embed/entrypoint_amd64: internal/mkcw/embed/entrypoint_amd64.s
|
||||
$(AS) -o $(patsubst %.s,%.o,$^) $^
|
||||
$(LD) -o $@ $(patsubst %.s,%.o,$^)
|
||||
strip $@
|
||||
|
||||
@@ -5,12 +5,12 @@ msg:
|
||||
.globl _start
|
||||
.type _start,@function
|
||||
_start:
|
||||
movq $1, %rax # write
|
||||
movq $2, %rdi # fd=stderr_fileno
|
||||
movq $msg, %rsi # message
|
||||
movq $75, %rdx # length
|
||||
movq $1, %rax # write
|
||||
movq $2, %rdi # fd=stderr_fileno
|
||||
movq $msg, %rsi # message
|
||||
movq $75, %rdx # length
|
||||
syscall
|
||||
movq $60, %rax # exit
|
||||
movq $1, %rdi # status=1
|
||||
movq $60, %rax # exit
|
||||
movq $1, %rdi # status=1
|
||||
syscall
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
@@ -2,5 +2,5 @@ package mkcw
|
||||
|
||||
import _ "embed"
|
||||
|
||||
//go:embed "embed/entrypoint.gz"
|
||||
//go:embed "embed/entrypoint_amd64.gz"
|
||||
var entrypointCompressedBytes []byte
|
||||
|
||||
Reference in New Issue
Block a user