mirror of
https://github.com/rui314/mold.git
synced 2024-10-10 19:57:19 +03:00
Format
This commit is contained in:
parent
6e5ae45c1a
commit
4e3364ddd3
@ -14,7 +14,6 @@ readelf -W --dyn-syms $t/exe1 | grep -Fq '__global_pointer$'
|
|||||||
$CC -B. -o $t/exe2 $t/a.o -fPIE
|
$CC -B. -o $t/exe2 $t/a.o -fPIE
|
||||||
readelf -W --dyn-syms $t/exe2 | grep -Fq '__global_pointer$'
|
readelf -W --dyn-syms $t/exe2 | grep -Fq '__global_pointer$'
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -o $t/b.o -c -xc - -fPIC
|
cat <<EOF | $CC -o $t/b.o -c -xc - -fPIC
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int hello() {
|
int hello() {
|
||||||
|
@ -25,7 +25,6 @@ __attribute__((tls_model("global-dynamic"))) static _Thread_local int x5 = 5;
|
|||||||
int get_x5() { return x5; }
|
int get_x5() { return x5; }
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $GCC -fPIC -fno-plt -c -o $t/c.o -xc -
|
cat <<EOF | $GCC -fPIC -fno-plt -c -o $t/c.o -xc -
|
||||||
__attribute__((tls_model("global-dynamic"))) _Thread_local int x4 = 4;
|
__attribute__((tls_model("global-dynamic"))) _Thread_local int x4 = 4;
|
||||||
__attribute__((tls_model("global-dynamic"))) static _Thread_local int x6 = 6;
|
__attribute__((tls_model("global-dynamic"))) static _Thread_local int x6 = 6;
|
||||||
|
@ -26,7 +26,6 @@ __attribute__((tls_model("global-dynamic"))) static _Thread_local int x5 = 5;
|
|||||||
int get_x5() { return x5; }
|
int get_x5() { return x5; }
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $GCC -fPIC -c -o $t/c.o -xc -
|
cat <<EOF | $GCC -fPIC -c -o $t/c.o -xc -
|
||||||
__attribute__((tls_model("global-dynamic"))) _Thread_local int x4 = 4;
|
__attribute__((tls_model("global-dynamic"))) _Thread_local int x4 = 4;
|
||||||
__attribute__((tls_model("global-dynamic"))) static _Thread_local int x6 = 6;
|
__attribute__((tls_model("global-dynamic"))) static _Thread_local int x6 = 6;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CXX -c -o $t/a.o -xc++ -fPIC -
|
cat <<EOF | $CXX -c -o $t/a.o -xc++ -fPIC -
|
||||||
int main() {
|
int main() {
|
||||||
try {
|
try {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -c -xassembler -o $t/a.o -
|
cat <<EOF | $CC -c -xassembler -o $t/a.o -
|
||||||
.globl main
|
.globl main
|
||||||
main:
|
main:
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -o $t/a.o -c -x assembler -
|
cat <<EOF | $CC -o $t/a.o -c -x assembler -
|
||||||
.globl __x86.get_pc_thunk.bx
|
.globl __x86.get_pc_thunk.bx
|
||||||
.section .gnu.linkonce.t.__x86.get_pc_thunk.bx,"ax"
|
.section .gnu.linkonce.t.__x86.get_pc_thunk.bx,"ax"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
echo '.section foo,"R"' | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip
|
echo '.section foo,"R"' | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip
|
||||||
|
|
||||||
cat <<EOF | $CC -o $t/a.o -c -xc -
|
cat <<EOF | $CC -o $t/a.o -c -xc -
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|
echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|
||||||
|| skip
|
|| skip
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|
echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|
||||||
|| skip
|
|| skip
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|
echo 'int main() {}' | $CC -m32 -o $t/exe -xc - >& /dev/null \
|
||||||
|| skip
|
|| skip
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
||||||
.section .init_array,"aw",@init_array
|
.section .init_array,"aw",@init_array
|
||||||
.p2align 3
|
.p2align 3
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
||||||
.globl init1, init2, fini1, fini2
|
.globl init1, init2, fini1, fini2
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -o $t/a.o -c -xc - -mcmodel=large
|
cat <<EOF | $CC -o $t/a.o -c -xc - -mcmodel=large
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
char arr1[0xc0000000];
|
char arr1[0xc0000000];
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
test_cflags -static || skip
|
test_cflags -static || skip
|
||||||
|
|
||||||
|
|
||||||
# Binutils 2.32 injects their own .note.gnu.property section interfering with the tests
|
# 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=""
|
test_cflags -Xassembler -mx86-used-note=no && CFLAGS="-Xassembler -mx86-used-note=no" || CFLAGS=""
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
# Binutils 2.32 injects their own .note.gnu.property section interfering with the tests
|
# 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=""
|
test_cflags -Xassembler -mx86-used-note=no && CFLAGS="-Xassembler -mx86-used-note=no" || CFLAGS=""
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<'EOF' | $CC -o $t/a.o -c -x assembler -
|
cat <<'EOF' | $CC -o $t/a.o -c -x assembler -
|
||||||
.text
|
.text
|
||||||
.globl main
|
.globl main
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
is_musl && skip
|
is_musl && skip
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
||||||
.globl preinit, init, fini
|
.globl preinit, init, fini
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -o $t/a.o -c -x assembler -
|
cat <<EOF | $CC -o $t/a.o -c -x assembler -
|
||||||
.globl foo
|
.globl foo
|
||||||
.data
|
.data
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -o $t/a.o -c -x assembler -
|
cat <<EOF | $CC -o $t/a.o -c -x assembler -
|
||||||
foo: jmp 0
|
foo: jmp 0
|
||||||
EOF
|
EOF
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<'EOF' | $CC -fPIC -c -o $t/a.o -x assembler -
|
cat <<'EOF' | $CC -fPIC -c -o $t/a.o -x assembler -
|
||||||
.data
|
.data
|
||||||
.globl ext_var
|
.globl ext_var
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<'EOF' | $CC -c -o $t/a.o -xc -
|
cat <<'EOF' | $CC -c -o $t/a.o -xc -
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<'EOF' | $CC -o $t/a.o -c -x assembler -
|
cat <<'EOF' | $CC -o $t/a.o -c -x assembler -
|
||||||
.globl _start
|
.globl _start
|
||||||
.text
|
.text
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/a.o -xc - -mcmodel=large
|
cat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/a.o -xc - -mcmodel=large
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@ -26,7 +25,6 @@ static _Thread_local int x5 = 5;
|
|||||||
int get_x5() { return x5; }
|
int get_x5() { return x5; }
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/c.o -xc - -mcmodel=large
|
cat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/c.o -xc - -mcmodel=large
|
||||||
_Thread_local int x4 = 4;
|
_Thread_local int x4 = 4;
|
||||||
static _Thread_local int x6 = 6;
|
static _Thread_local int x6 = 6;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
||||||
.globl x, y
|
.globl x, y
|
||||||
.section .tbss,"awT",@nobits
|
.section .tbss,"awT",@nobits
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $GCC -ftls-model=local-dynamic -fPIC -c -o $t/a.o -xc - -mcmodel=large
|
cat <<EOF | $GCC -ftls-model=local-dynamic -fPIC -c -o $t/a.o -xc - -mcmodel=large
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -fPIC -o $t/a.o -c -xassembler -
|
cat <<EOF | $CC -fPIC -o $t/a.o -c -xassembler -
|
||||||
.globl get_foo
|
.globl get_foo
|
||||||
.type get_foo, @function
|
.type get_foo, @function
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
cat <<EOF | $CC -c -o $t/a.o -x assembler -
|
||||||
.section .data.foo.1,"aw",@progbits
|
.section .data.foo.1,"aw",@progbits
|
||||||
.ascii "a"
|
.ascii "a"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -o $t/a.o -c -xassembler -
|
cat <<EOF | $CC -o $t/a.o -c -xassembler -
|
||||||
.section .note.GNU-stack, "x"
|
.section .note.GNU-stack, "x"
|
||||||
EOF
|
EOF
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. $(dirname $0)/common.inc
|
. $(dirname $0)/common.inc
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF | $CC -fPIC -o $t/a.o -c -xc -
|
cat <<EOF | $CC -fPIC -o $t/a.o -c -xc -
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
void hello() { printf("Hello"); }
|
void hello() { printf("Hello"); }
|
||||||
|
Loading…
Reference in New Issue
Block a user