diff options
-rw-r--r-- | flattree.c | 2 | ||||
-rw-r--r-- | tests/Makefile.tests | 4 | ||||
-rwxr-xr-x | tests/run_tests.sh | 7 | ||||
-rw-r--r-- | tests/value-labels.c | 4 |
4 files changed, 11 insertions, 6 deletions
@@ -166,7 +166,7 @@ static void asm_emit_align(void *e, int a) { FILE *f = e; - fprintf(f, "\t.balign\t%d\n", a); + fprintf(f, "\t.balign\t%d, 0\n", a); } static void asm_emit_data(void *e, struct data d) diff --git a/tests/Makefile.tests b/tests/Makefile.tests index e35afa6..2696581 100644 --- a/tests/Makefile.tests +++ b/tests/Makefile.tests @@ -41,7 +41,9 @@ tests: $(TESTS) $(TESTS_TREES) $(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_archive) -$(DL_LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_archive) -ldl +$(DL_LIB_TESTS): %: %.o $(TESTS_PREFIX)testutils.o $(LIBFDT_archive) + @$(VECHO) LD [libdl] $@ + $(LINK.c) -o $@ $^ -ldl $(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_archive) diff --git a/tests/run_tests.sh b/tests/run_tests.sh index db413a1..5d901c2 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -2,6 +2,10 @@ . ./tests.sh +if [ -z "$CC" ]; then + CC=gcc +fi + export QUIET_TEST=1 export VALGRIND= @@ -72,8 +76,7 @@ run_dtc_test () { } asm_to_so () { - as -o $1.test.o data.S $1.test.s && \ - ld -shared -o $1.test.so $1.test.o + $CC -shared -o $1.test.so data.S $1.test.s } asm_to_so_test () { diff --git a/tests/value-labels.c b/tests/value-labels.c index d11c34e..c5aea8f 100644 --- a/tests/value-labels.c +++ b/tests/value-labels.c @@ -89,9 +89,9 @@ void check_prop_labels(void *sohandle, void *fdt, const char *name, FAIL("Couldn't locate label symbol \"%s\"", name); if ((p - prop->data) != off) - FAIL("Label \"%s\" points to offset %d instead of %d" + FAIL("Label \"%s\" points to offset %ld instead of %d" "in property \"%s\"", labels[i].labelname, - p - prop->data, off, name); + (long)(p - prop->data), off, name); } } |