public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gold: add cast to gold_unreachable to workaround gcc giving   invalid "no return statement" warnings
@ 2009-08-13 15:09 Mikolaj Zalewski
  2009-08-14  8:34 ` Ian Lance Taylor
  2009-08-31 21:49 ` [PATCH] Gold: Added R_ARM_ABS8 relocation Viktor Kutuzov
  0 siblings, 2 replies; 26+ messages in thread
From: Mikolaj Zalewski @ 2009-08-13 15:09 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

  I couldn't compile gold today because of the "no return statement"
warning when using gold_unreachable. At
http://gcc.gnu.org/ml/gcc-bugs/2007-11/msg01605.html I've found a
workaround that should work for gcc >= 3.4. Such a patch that affects
only gold_unreachable is ok?

2009-08-13  Mikolaj Zalewski  <mikolajz@google.com>

	* gold.h (gold_unreachable): Add a cast.

[-- Attachment #2: 0001-gold-add-cast-to-gold_unreachable-to-workaround-gcc.patch --]
[-- Type: text/x-diff, Size: 1041 bytes --]

From 2c4c78358538c7b260a2d23a66add87e28d9a1ad Mon Sep 17 00:00:00 2001
From: Mikolaj Zalewski <mikolajz@google.com>
Date: Thu, 13 Aug 2009 16:56:44 +0200
Subject: [PATCH] gold: add cast to gold_unreachable to workaround gcc giving invalid "no return statement" warnings

---
 gold/gold.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gold/gold.h b/gold/gold.h
index 1319699..3c9971d 100644
--- a/gold/gold.h
+++ b/gold/gold.h
@@ -255,9 +255,11 @@ gold_nomem() ATTRIBUTE_NORETURN;
 
 // This macro and function are used in cases which can not arise if
 // the code is written correctly.
+// Note: the cast of __FUNCTION__ is needed to workaround gcc bug
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30988 causing invalid warnings.
 
 #define gold_unreachable() \
-  (gold::do_gold_unreachable(__FILE__, __LINE__, __FUNCTION__))
+  (gold::do_gold_unreachable(__FILE__, __LINE__, (const char *)__FUNCTION__))
 
 extern void do_gold_unreachable(const char*, int, const char*)
   ATTRIBUTE_NORETURN;
-- 
1.5.4.3


^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: [PATCH, Take 2] Gold: Added R_ARM_ABS8 relocation unit test
@ 2009-09-11 17:50 Viktor Kutuzov
  0 siblings, 0 replies; 26+ messages in thread
From: Viktor Kutuzov @ 2009-09-11 17:50 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]

Ping. Can somebody commit this patch if it is OK or tell what's wrong with it, please?

Best regards,
Viktor

----- Original Message ----- 
From: "Viktor Kutuzov" <vkutuzov@accesssoftek.com>
To: <binutils@sourceware.org>
Sent: Thursday, September 03, 2009 4:26 PM
Subject: [PATCH, Take 2] Gold: Added R_ARM_ABS8 relocation unit test


Hello everyone,

Please find attached the updated patch for the R_ARM_ABS8 relocation unit test.

The patch contains changes for automake system to include testsuite/arm directory to the build as well as a shell unit test script 
for R_ARM_ABS8 relocation along with the needed asm file. The unit tests are testing R_ARM_ABS8 relocation for the follwoing cases:

* static local relocation in a read-only segment;
* static global relocation in a read-only segment;
* static local relocation in a read-write segment;
* static global relocation in a read-write segment;
* static local relocation overflow in a read-only segment;

Hope the patch is not too big.

Best regards,
Viktor

* gold/configure.ac: Added target-dependent (for ARM) testsuite/arm/Makefile
* gold/testsuite/Makefile.am: Included testsuite/arm directory for automake
* gold/testsuite/arm/Makefile.am: Included testsuite/arm directory for automake

* gold/testsuite/arm/reloc_abs_test.sh: Unit test script for R_ARM_ABS*

* gold/testsuite/arm/arm_r_abs8_local.s: Asm for the R_ARM_ABS8 relocation unit test (local reloc)
* gold/testsuite/arm/arm_r_abs8_global.s: Asm for the R_ARM_ABS8 relocation unit test (global reloc)
* gold/testsuite/arm/arm_r_abs8_external.s: Asm for the R_ARM_ABS8 relocation unit test (external symbol)
* gold/testsuite/arm/arm_r_abs8_localrw.s: Asm for the R_ARM_ABS8 relocation unit test (local reloc in a read/write segment)

----- Original Message ----- 
From: "Viktor Kutuzov" <vkutuzov@accesssoftek.com>
To: <binutils@sourceware.org>
Sent: Tuesday, September 01, 2009 6:30 PM
Subject: [PATCH] Gold: Added R_ARM_ABS8 relocation unit test


Hello everyone,

Please find attached the patch for the R_ARM_ABS8 relocation unit test.

Best regards,
Viktor

* gold/testsuite/reloc_abs_test.sh: Script to test platform independent and dependent ABS relocations
* gold/testsuite/arm/arm_r_abs8_local.s: Asm for the R_ARM_ABS8 relocation unit test

[-- Attachment #2: binutil-gold-arm-rel-abs8-unittest-02.diff --]
[-- Type: application/octet-stream, Size: 16622 bytes --]

diff -rupN binutils.orig/src/gold/configure.ac binutils.gold/src/gold/configure.ac
--- binutils.orig/src/gold/configure.ac	2009-06-23 11:10:41.000000000 -0700
+++ binutils.gold/src/gold/configure.ac	2009-09-02 12:41:45.000000000 -0700
@@ -224,6 +224,8 @@ AM_CONDITIONAL(FN_PTRS_IN_SO_WITHOUT_PIC
 dnl Whether we can test -mcmodel=medium.
 AM_CONDITIONAL(MCMODEL_MEDIUM, [test "$target_cpu" = "x86_64"])
 
+AM_CONDITIONAL(TARGET_ARM, [test "$target_cpu" = "arm"])
+
 dnl Test for __thread support.
 AC_CACHE_CHECK([for thread support], [gold_cv_c_thread],
 [AC_COMPILE_IFELSE([__thread int i = 1;],
@@ -368,4 +370,4 @@ AC_LANG_POP(C++)
 
 AM_MAINTAINER_MODE
 
-AC_OUTPUT(Makefile testsuite/Makefile po/Makefile.in:po/Make-in)
+AC_OUTPUT(Makefile testsuite/Makefile po/Makefile.in:po/Make-in testsuite/arm/Makefile)
diff -rupN binutils.orig/src/gold/testsuite/arm/arm_r_abs8_external.s binutils.gold/src/gold/testsuite/arm/arm_r_abs8_external.s
--- binutils.orig/src/gold/testsuite/arm/arm_r_abs8_external.s	1969-12-31 16:00:00.000000000 -0800
+++ binutils.gold/src/gold/testsuite/arm/arm_r_abs8_external.s	2009-09-02 16:58:58.000000000 -0700
@@ -0,0 +1,26 @@
+@FILE: arm_r_abs8_external.s
+@TEST RELOCATION : R_ARM_ABS8
+
+	.cpu arm10tdmi
+
+	.section	.rodata 
+	.align	4
+LLCT0:
+	.ascii	"Hello_ABS8\000"
+
+	.text
+	.align 0
+
+	.byte	'>'		@ Segment start visual marker
+GCS0:
+	.byte	LLCT0		@ ABS8 relocation (LOCAL)
+GCS0_GL:
+	.byte	GLCT0		@ ABS8 relocation (GLOBAL)
+
+_start:
+	.global _start
+
+	ldrb	r3, GCS0	@ Load byte offset
+	ldrb	r3, GCS0_GL	@ Load byte offset
+
+	.end
diff -rupN binutils.orig/src/gold/testsuite/arm/arm_r_abs8_global.s binutils.gold/src/gold/testsuite/arm/arm_r_abs8_global.s
--- binutils.orig/src/gold/testsuite/arm/arm_r_abs8_global.s	1969-12-31 16:00:00.000000000 -0800
+++ binutils.gold/src/gold/testsuite/arm/arm_r_abs8_global.s	2009-09-03 13:47:03.000000000 -0700
@@ -0,0 +1,11 @@
+@FILE: arm_r_abs8_global.s
+@TEST RELOCATION : R_ARM_ABS8
+
+	.cpu arm10tdmi
+
+	.section	.rodata 
+	.align	4
+GLCT0:	.global GLCT0
+	@ Unique 128-bit signature
+	.octa    0xD78E074738E649789A7D5ED45F7EFF74
+	.end
diff -rupN binutils.orig/src/gold/testsuite/arm/arm_r_abs8_localrw.s binutils.gold/src/gold/testsuite/arm/arm_r_abs8_localrw.s
--- binutils.orig/src/gold/testsuite/arm/arm_r_abs8_localrw.s	1969-12-31 16:00:00.000000000 -0800
+++ binutils.gold/src/gold/testsuite/arm/arm_r_abs8_localrw.s	2009-09-02 15:28:49.000000000 -0700
@@ -0,0 +1,41 @@
+@FILE: arm_r_abs8_localrw.s
+@TEST RELOCATION : R_ARM_ABS8
+@Local static relocation for RO/RW data.
+
+	.cpu arm10tdmi
+	.org 0
+
+	@----------------------------------------------------
+	.section	.rodata 
+	.align	4
+___T0:
+	.ascii	"123\000"	@ Make some shift for the source data.
+LLCT0:
+	.ascii	"Hello_ABS8\000"
+
+	@----------------------------------------------------
+	.section	.data
+___D0:
+	.ascii	"456\000"
+DLCT0:
+	.ascii	"Hello_ABS8_RW\000"
+
+	@----------------------------------------------------
+	.text
+	.align 0
+
+	.byte	'>'		@ Segment start visual marker
+LCS0:
+	.byte	LLCT0		@ ABS8 relocation (LOCAL)
+LCS1:
+	.byte	DLCT0
+
+	@----------------------------------------------------
+_start:
+	.global _start
+
+	ldrb	r3, LCS0	@ Load byte offset
+	ldrb	r3, LCS1
+
+	@----------------------------------------------------
+	.end
diff -rupN binutils.orig/src/gold/testsuite/arm/arm_r_abs8_local.s binutils.gold/src/gold/testsuite/arm/arm_r_abs8_local.s
--- binutils.orig/src/gold/testsuite/arm/arm_r_abs8_local.s	1969-12-31 16:00:00.000000000 -0800
+++ binutils.gold/src/gold/testsuite/arm/arm_r_abs8_local.s	2009-09-02 15:43:46.000000000 -0700
@@ -0,0 +1,30 @@
+@FILE: arm_r_abs8_local.s
+@TEST RELOCATION : R_ARM_ABS8
+@Local static relocation for RO data.
+
+	.cpu arm10tdmi
+
+	@----------------------------------------------------
+	.section	.rodata 
+	.align	4
+___T0:
+	.ascii	"123\000"	@ Make some shift for the source data.
+LLCT0:
+	.ascii	"Hello_ABS8\000"
+
+	@----------------------------------------------------
+	.text
+	.align 0
+
+	.byte	'>'		@ Segment start visual marker
+LCS0:
+	.byte	LLCT0		@ ABS8 relocation (LOCAL)
+
+	@----------------------------------------------------	
+_start:
+	.global _start
+
+	ldrb	r3, LCS0	@ Load byte offset
+
+	@----------------------------------------------------
+	.end
diff -rupN binutils.orig/src/gold/testsuite/arm/Makefile.am binutils.gold/src/gold/testsuite/arm/Makefile.am
--- binutils.orig/src/gold/testsuite/arm/Makefile.am	1969-12-31 16:00:00.000000000 -0800
+++ binutils.gold/src/gold/testsuite/arm/Makefile.am	2009-09-02 15:59:15.000000000 -0700
@@ -0,0 +1,94 @@
+# Process this file with automake to generate Makefile.in
+
+# Platform depended tests - ARM
+#
+# As far as I can tell automake testing support assumes that the build
+# system and the host system are the same.  So these tests will not
+# work when building with a cross-compiler.
+
+# Ignore warning about AM_PROG_CC_C_O due to large_CFLAGS
+AUTOMAKE_OPTIONS = foreign -Wno-portability
+
+# The two_file_test tests -fmerge-constants, so we simply always turn
+# it on.  This may need to be controlled by a configure option
+# eventually.
+AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) -fmerge-constants
+AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) -fmerge-constants
+
+AM_CPPFLAGS = \
+	-I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../../include \
+	-I$(srcdir)/../../elfcpp -I.. \
+	-DLOCALEDIR="\"$(datadir)/locale\"" \
+	@INCINTL@
+
+TEST_READELF = $(top_builddir)/../binutils/readelf
+TEST_OBJDUMP = $(top_builddir)/../binutils/objdump
+TEST_CXXFILT = $(top_builddir)/../binutils/cxxfilt
+TEST_STRIP = $(top_builddir)/../binutils/strip-new
+TEST_AR = $(top_builddir)/../binutils/ar
+TEST_NM = $(top_builddir)/../binutils/nm-new
+TEST_AS = $(top_builddir)/../gas/as-new
+TEST_LD = $(top_builddir)/../gold/ld-new
+
+# 'make clean' is good about deleting some intermediate files (such as
+# .o's), but not all of them (such as .so's and .err files).  We
+# improve on that here.  automake-1.9 info docs say "mostlyclean" is
+# the right choice for files 'make' builds that people rebuild.
+MOSTLYCLEANFILES = *.so *.o
+
+
+# We will add to these later, for each individual test.  Note
+# that we add each test under check_SCRIPTS or check_PROGRAMS;
+# the TESTS variable is automatically populated from these.
+check_SCRIPTS =
+check_DATA =
+check_PROGRAMS =
+check_LIBRARIES = 
+BUILT_SOURCES =
+
+TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
+
+# ---------------------------------------------------------------------
+# The unittests themselves
+
+if TARGET_ARM
+
+# Test - ABS relocations
+
+MOSTLYCLEANFILES += arm_r_abs8_local arm_r_abs8_localrw arm_r_abs8_external
+
+BUILT_SOURCES += \
+	arm_r_abs8_local.s \
+	arm_r_abs8_localrw.s \
+	arm_r_abs8_global.s \
+	arm_r_abs8_external.s
+
+check_DATA += \
+	arm_r_abs8_local \
+	arm_r_abs8_external \
+	arm_r_abs8_localrw \
+	arm_r_abs8_localoverflow.o
+
+check_SCRIPTS += \
+	reloc_abs_test.sh
+
+arm_r_abs8_local.o: arm_r_abs8_local.s
+	$(TEST_AS) -o $@ $<
+arm_r_abs8_localrw.o: arm_r_abs8_localrw.s
+	$(TEST_AS) -o $@ $<
+arm_r_abs8_localoverflow.o: arm_r_abs8_localrw.s
+	$(TEST_AS) -o $@ $<
+arm_r_abs8_global.o: arm_r_abs8_global.s
+	$(TEST_AS) -o $@ $<
+arm_r_abs8_external.o: arm_r_abs8_external.s
+	$(TEST_AS) -o $@ $<
+
+arm_r_abs8_local: arm_r_abs8_local.o
+	$(TEST_LD) -Ttext=0 -o $@ $<
+arm_r_abs8_localrw: arm_r_abs8_localrw.o
+	$(TEST_LD) -Ttext=0 -Tdata=0x90 -o $@ $<
+arm_r_abs8_external: arm_r_abs8_external.o arm_r_abs8_global.o
+	$(TEST_LD) -Ttext=0 -o $@ $< arm_r_abs8_global.o
+
+endif TARGET_ARM
+
diff -rupN binutils.orig/src/gold/testsuite/arm/reloc_abs_test.sh binutils.gold/src/gold/testsuite/arm/reloc_abs_test.sh
--- binutils.orig/src/gold/testsuite/arm/reloc_abs_test.sh	1969-12-31 16:00:00.000000000 -0800
+++ binutils.gold/src/gold/testsuite/arm/reloc_abs_test.sh	2009-09-03 14:28:31.000000000 -0700
@@ -0,0 +1,211 @@
+#!/bin/sh
+
+# reloc_abs_test.sh -- a test case for the ABS relocations.
+
+# Copyright 2009 Free Software Foundation, Inc.
+# Written by Viktor Kutuzov <vkutuzov@accesssoftek.com>.
+
+# This file is a part of gold.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+check_relocation_abs()
+{
+  # Arguments: 
+  #  $1 - Linked file name. The file with the same name and extention '.o'
+  #       will be looked for objects.
+  #  $2 - Symbol name. The relocation to test is referenced by this unique
+  #       symbol name.
+  #  $3 - Destination segment name the relocation to test is applied to.
+
+  # Retrieve original addend from the object file by using a value
+  # in the second column of the readelf symbol table dump.
+  # The readelf output dump looks like this:
+  # --------vvvvvvvv--------------------------------------------------------
+  # Symbol table '.symtab' contains 13 entries:
+  #    Num:    Value  Size Type    Bind   Vis      Ndx Name
+  #      7: 00000004     0 NOTYPE  LOCAL  DEFAULT    5 LLCT0
+
+  addend=`readelf -s $1.o | grep -w $2 | sed 's/^/:/;s/$/:/;s/[: ][: ]*/:/g' | cut -d: -f3`
+  if test -z "$addend"; then
+    echo "Did not find symbol $2 in $1.o"
+    exit 1
+  fi
+
+  # Retrieve the resolved static relocation from the linked file.
+  # We are looking for a value in the second column of the dump
+  # which looks like the one above.
+
+  linker_resolved=`readelf -s $1 | grep -w $2 | sed 's/^/:/;s/$/:/;s/[: ][: ]*/:/g' | cut -d: -f3`
+  if test -z "$linker_resolved"; then
+    echo "Did not find symbol $2 in $1"
+    exit 1
+  fi
+
+  # Retrieve the requested segment offset from the linked file.
+  # The value is in the  readelf output dump looks something like this:
+  # -------------------------------------vvvvvv-------------------------
+  # Section Headers:
+  #   [Nr] Name      Type       Addr     Off    Size   ES Flg Lk Inf Al
+  #   [ 2] .rodata   PROGBITS   00000080 000080 000010 00   A  0   0 16
+
+  segment_offset=`readelf -S $1 | grep -w $3 | sed 's/\]//;s/\[//;s/^/:/;s/$/:/;s/[: ][: ]*/:/g' | cut -d: -f6`
+  if test -z "$segment_offset"; then
+    echo "Did not find segment $3 in $1"
+    exit 1
+  fi
+
+  linker_result=$((0x$linker_resolved + 0))
+  valid_result=$((0x$addend + 0x$segment_offset))
+
+  # Note: Uncomment the following lines to get additional debug information
+  # printed out.
+  #echo "debug: retrieved addend: $addend"
+  #echo "debug: retrieved $3 segment offset: $segment_offset"
+  #echo "debug: retrieved linker_resolved: $linker_resolved"
+  #echo "debug: linker resolved relocation value: $linker_result"
+  #echo "debug: calculated relocation value: $valid_result"
+
+  if test "$linker_result" != "$valid_result"; then
+    echo "check_relocation_abs: unexpected result for relocation value in $1:"
+    echo "   $valid_result"
+    echo ""
+    echo "Actual value below:"
+    echo "$linker_result"
+    exit 1
+  fi
+}
+
+check_relocation_abs_global()
+{
+  # Arguments: 
+  #  $1 - Linked file name. The file with the same name and extention '.o'
+  #       will be looked for objects.
+  file_name=$1
+  #  $2 - Symbol name. The relocation to test is referenced by this unique
+  #       symbol name.
+  symbol_name=$2
+  #  $3 - Destination segment name the relocation to test is applied to.
+  segment_name=$3
+  #  $4 - Unique 128-bit signature to match.
+  signature=$4
+  
+
+  linker_result=`readelf -s $file_name | grep -w $symbol_name | sed 's/^/:/;s/$/:/;s/[: ][: ]*/:/g' | cut -d: -f3`
+  if test -z "$linker_result"; then
+    echo "Did not find symbol $symbol_name in $file_name"
+    exit 1
+  fi
+
+  # readelf -x ".rodata" <executable_object>
+  #
+  # Hex dump of section '.rodata':
+  #   0x00000080 48656c6c 6f5f4142 53380000 00000000 Hello_ABS8......
+  #   0x00000090 74ff7e5f d45e7d9a 7849e638 47078ed7 t.~_.^}.xI.8G...
+
+  valid_result=`readelf -x $segment_name $file_name | grep -iw "$signature" | sed 's/^/:/;s/$/:/;s/[: ][: ]*/:/g' | cut -d: -f2`
+
+  linker_result=$((0x$linker_result + 0))
+  valid_result=$(($valid_result + 0))
+
+  #echo "debug: linked_result=$linker_result"
+  #echo "debug: valid_result=$valid_result"
+
+  if test $linker_result != $valid_result; then
+    echo "check_relocation_abs_global: unexpected result for relocation value in $file_name:"
+    echo "   $valid_result"
+    echo ""
+    echo "Actual value below:"
+    echo "$linker_result"
+    exit 1
+  fi
+}
+
+check_relocation_abs_value()
+{
+  # Arguments: 
+  #  $1 - Linked file name. The file with the same name and extention '.o'
+  #       will be looked for objects.
+  file_name=$1
+  #  $2 - Symbol name. The relocation to test is referenced by this unique
+  #       symbol name.
+  symbol_name=$2
+  #  $3 - Symbol name. The relocation reference within the .text section
+  symbol_reloc_name=$3
+
+  valid_result=`readelf -s $file_name | grep -w $symbol_name | sed 's/^/:/;s/$/:/;s/[: ][: ]*/:/g' | cut -d: -f3`
+  if test -z "$valid_result"; then
+    echo "Did not find symbol $symbol_name in $file_name"
+    exit 1
+  fi
+
+  symbol_reloc_address=`readelf -s $file_name | grep -w $symbol_reloc_name | sed 's/^/:/;s/$/:/;s/[: ][: ]*/:/g' | cut -d: -f3 | sed 's/^0*//g'` 
+  if test -z "$symbol_reloc_address"; then
+    echo "Did not find symbol $symbol_reloc_name in $file_name"
+    exit 1
+  fi
+
+  # Result transformation from string like "76:	90          	.byte	0x90" 
+  # to "76:90:.byte:0x90"
+  linker_result=`../../../binutils/objdump -ds $file_name | sed -e 's/^\s*//g' -e 's/^0*//g' | grep "^$symbol_reloc_address:" | sed -e 's/://' -e 's/\t/:/g' -e 's/\s//g' | cut -d: -f2`
+
+  linker_result=$((0x$linker_result + 0))
+  valid_result=$((0x$valid_result + 0))
+
+  #echo "debug: valid_result=$valid_result"
+  #echo "debug: symbol_reloc_address=$symbol_reloc_address"
+  #echo "debug: linked_result=$linker_result"
+
+  if test $linker_result != $valid_result; then
+    echo "check_relocation_abs_global: unexpected result for relocation value in $file_name:"
+    echo "   $valid_result"
+    echo ""
+    echo "Actual value below:"
+    echo "$linker_result"
+    exit 1
+  fi
+}
+
+check_relocation_abs_overflow()
+{
+  valid_result="relocation overflow in relocation"
+  linker_result=`../../ld-new -Ttext=$2 -Tdata=$3 -o $1 $1.o 2>&1 | grep "$valid_result"`
+
+  if test "$linker_result" = ""; then
+    echo "check_relocation_abs_overflow: unexpected result in $1.o:"
+    echo "   $valid_result"
+    echo ""
+    echo "Actual value below:"
+    echo "$linker_result"
+    exit 1
+  fi
+}
+
+
+# Unit tests:
+
+check_relocation_abs arm_r_abs8_local "LLCT0" ".rodata"
+check_relocation_abs arm_r_abs8_external "LLCT0" ".rodata"
+check_relocation_abs arm_r_abs8_localrw "LLCT0" ".rodata"
+check_relocation_abs arm_r_abs8_localrw "DLCT0" ".data"
+
+check_relocation_abs_overflow arm_r_abs8_localoverflow 0 0x100
+
+check_relocation_abs_global arm_r_abs8_external "GLCT0" ".rodata" "74ff7e5f d45e7d9a 7849e638 47078ed7"
+check_relocation_abs_value arm_r_abs8_external "GLCT0" "GCS0_GL"
+
+exit 0
+
diff -rupN binutils.orig/src/gold/testsuite/Makefile.am binutils.gold/src/gold/testsuite/Makefile.am
--- binutils.orig/src/gold/testsuite/Makefile.am	2009-08-22 12:02:57.000000000 -0700
+++ binutils.gold/src/gold/testsuite/Makefile.am	2009-09-02 13:09:21.000000000 -0700
@@ -26,6 +26,12 @@ TEST_STRIP = $(top_builddir)/../binutils
 TEST_AR = $(top_builddir)/../binutils/ar
 TEST_NM = $(top_builddir)/../binutils/nm-new
 
+SUBDIRS =
+
+if TARGET_ARM
+SUBDIRS += arm
+endif
+
 if PLUGINS
 LIBDL = -ldl
 endif

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2009-10-07 15:31 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-13 15:09 [PATCH] gold: add cast to gold_unreachable to workaround gcc giving invalid "no return statement" warnings Mikolaj Zalewski
2009-08-14  8:34 ` Ian Lance Taylor
2009-08-14  9:28   ` Mikolaj Zalewski
2009-08-14  9:36     ` Ian Lance Taylor
2009-08-31 21:49 ` [PATCH] Gold: Added R_ARM_ABS8 relocation Viktor Kutuzov
2009-08-31 23:52   ` Gold: Testsuite Viktor Kutuzov
2009-09-01  0:46     ` Ian Lance Taylor
2009-09-01  1:02       ` Viktor Kutuzov
2009-09-01  2:10         ` Ian Lance Taylor
     [not found]           ` <6AE1604EE3EC5F4296C096518C6B77EEE56FBF60@mail.accesssoftek.com>
2009-09-02  1:31             ` Viktor Kutuzov
2009-09-01  0:56   ` [PATCH] Gold: Added R_ARM_ABS8 relocation Ian Lance Taylor
2009-09-01 19:53     ` [PATCH Take 2] " Viktor Kutuzov
2009-09-01 21:24       ` Ian Lance Taylor
2009-09-02  1:30         ` [PATCH] Gold: Added R_ARM_ABS8 relocation unit test Viktor Kutuzov
2009-09-16  0:23           ` [PATCH] Gold: Added R_ARM_GOT_PREL relocation and unit tests Viktor Kutuzov
2009-09-16  1:00             ` [Gold] Heads up. Working on interworking Viktor Kutuzov
2009-10-06 21:46               ` [GOLD] Heads up. Gold for mingw Viktor Kutuzov
2009-10-06 22:02                 ` Vincent R.
2009-10-06 22:26                   ` Viktor Kutuzov
2009-10-06 22:06                 ` Matt Rice
2009-10-07 15:31             ` [PATCH] Gold: Added R_ARM_GOT_PREL relocation and unit tests Ian Lance Taylor
     [not found]         ` <6AE1604EE3EC5F4296C096518C6B77EEE56FBF62@mail.accesssoftek.com>
2009-09-03 23:26           ` [PATCH, Take 2] Gold: Added R_ARM_ABS8 relocation unit test Viktor Kutuzov
2009-09-27  7:35             ` Ian Lance Taylor
2009-09-29 23:30               ` Viktor Kutuzov
2009-09-29 23:40                 ` Ian Lance Taylor
2009-09-11 17:50 Viktor Kutuzov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).