Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Mar 25, 2024
1 parent 8df5a76 commit 0edbe29
Show file tree
Hide file tree
Showing 39 changed files with 0 additions and 55 deletions.
3 changes: 0 additions & 3 deletions test/elf/x86_64_emulation-deduction.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -o $t/a.o -c -xc -
void _start() {}
EOF
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_endbr.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip
test_cflags -fcf-protection || skip

cat <<EOF | $CC -o $t/a.o -c -xc - -ffunction-sections -O -fcf-protection
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_endbr2.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip
test_cflags -fcf-protection || skip

cat <<EOF | $CC -o $t/a.o -c -xc - -fno-function-sections -O -fcf-protection
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_exception-mcmodel-large.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CXX -c -o $t/a.o -xc++ -fPIC -
int main() {
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_execstack-if-needed.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -c -xassembler -o $t/a.o -
.globl main
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_gnu-linkonce.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -o $t/a.o -c -x assembler -
.globl __x86.get_pc_thunk.bx
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_gnu-retain.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

echo '.section foo,"R"' | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip

Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_incompatible-libs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|| skip
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_incompatible-libs2.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|| skip
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_incompatible-obj.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|| skip
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_init-array-readonly.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -c -o $t/a.o -x assembler -
.section .init_array,"aw",@init_array
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_init-array.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -c -o $t/a.o -x assembler -
.globl init1, init2, fini1, fini2
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_large-bss.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -o $t/a.o -c -xc - -mcmodel=large
#include <stdio.h>
Expand Down
3 changes: 0 additions & 3 deletions test/elf/x86_64_mergeable-records.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip

test_cflags -static || skip

cat <<'EOF' | $CC -o $t/a.o -c -x assembler -
Expand Down
3 changes: 0 additions & 3 deletions test/elf/x86_64_mergeable-strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

test_cflags -static || skip

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip

cat <<'EOF' | $CC -o $t/a.o -c -x assembler -
.text
.globl main
Expand Down
3 changes: 0 additions & 3 deletions test/elf/x86_64_note-property.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip

echo endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip

$CC -fcf-protection=branch -c /dev/null -o /dev/null -xc 2> /dev/null || skip
Expand Down
3 changes: 0 additions & 3 deletions test/elf/x86_64_note-property2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# OneTBB isn't tsan-clean
nm mold | grep -q '__tsan_init' && skip

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip

# Binutils 2.32 injects their own .note.gnu.property section interfering with the tests
test_cflags -Xassembler -mx86-used-note=no && CFLAGS="-Xassembler -mx86-used-note=no" || CFLAGS=""

Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_note.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

test_cflags -static || skip

[ $MACHINE = x86_64 ] || skip

# Binutils 2.32 injects their own .note.gnu.property section interfering with the tests
test_cflags -Xassembler -mx86-used-note=no && CFLAGS="-Xassembler -mx86-used-note=no" || CFLAGS=""
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_note2.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

# Binutils 2.32 injects their own .note.gnu.property section interfering with the tests
test_cflags -Xassembler -mx86-used-note=no && CFLAGS="-Xassembler -mx86-used-note=no" || CFLAGS=""
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_plt.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<'EOF' | $CC -o $t/a.o -c -x assembler -
.text
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_preinit-array.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

is_musl && skip

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -c -o $t/a.o -x assembler -
.globl preinit, init, fini
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_relax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
. $(dirname $0)/common.inc

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip
echo ret | cc -c -o /dev/null -xassembler -Wa,-mrelax-relocations=yes - 2> /dev/null || skip

cat <<EOF | $CC -o $t/a.o -c -x assembler -Wa,-mrelax-relocations=yes -
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_reloc-overflow.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -o $t/a.o -c -x assembler -
.globl foo
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_reloc-zero.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -o $t/a.o -c -x assembler -
foo: jmp 0
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_reloc.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<'EOF' | $CC -fPIC -c -o $t/a.o -x assembler -
.data
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_section-alignment.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<'EOF' | $CC -c -o $t/a.o -xc -
#include <stdint.h>
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_section-name.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<'EOF' | $CC -o $t/a.o -c -x assembler -
.globl _start
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_tls-gd-mcmodel-large.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/a.o -xc - -mcmodel=large
#include <stdio.h>
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_tls-large-tbss.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || [[ $MACHINE = riscv* ]] || skip

cat <<EOF | $CC -c -o $t/a.o -x assembler -
.globl x, y
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_tls-ld-mcmodel-large.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $GCC -ftls-model=local-dynamic -fPIC -c -o $t/a.o -xc - -mcmodel=large
#include <stdio.h>
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_tls-module-base.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -fPIC -o $t/a.o -c -xassembler -
.globl get_foo
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_unique.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -c -o $t/a.o -x assembler -
.section .data.foo.1,"aw",@progbits
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_warn-execstack.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -o $t/a.o -c -xassembler -
.section .note.GNU-stack, "x"
Expand Down
3 changes: 0 additions & 3 deletions test/elf/x86_64_warn-shared-textrel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# Skip if libc is musl
is_musl && skip

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip

cat <<'EOF' | $CC -c -o $t/a.o -x assembler -
.globl fn
fn:
Expand Down
3 changes: 0 additions & 3 deletions test/elf/x86_64_warn-textrel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# Skip if libc is musl
is_musl && skip

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip

cat <<'EOF' | $CC -c -o $t/a.o -x assembler -
.globl fn
fn:
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_z-ibt.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip
echo endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip

cat <<EOF | $CC -o $t/a.o -c -x assembler -
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_z-ibtplt.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip

cat <<EOF | $CC -fPIC -o $t/a.o -c -xc -
#include <stdio.h>
Expand Down
1 change: 0 additions & 1 deletion test/elf/x86_64_z-shstk.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
. $(dirname $0)/common.inc

[ $MACHINE = x86_64 ] || skip
echo endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip

cat <<EOF | $CC -o $t/a.o -c -x assembler -
Expand Down
3 changes: 0 additions & 3 deletions test/elf/x86_64_z-text.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# Skip if libc is musl
is_musl && skip

# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || skip

cat <<'EOF' | $CC -c -o $t/a.o -x assembler -
.globl fn1
fn1:
Expand Down

0 comments on commit 0edbe29

Please sign in to comment.