This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, avr] Add DIFF relocations

On Thu, Apr 10, 2014 at 12:51:43PM -0600, Tom Tromey wrote:
> >>>>> "Denis" == Denis Chertykov <> writes:
> >> * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
> Denis> Committed.
> On x86-64 Fedora 20, with --enable-targets=all, I get:
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_all_vecs -DBINDIR=\"/home/tromey/gnu/gdb/devel/install/bin\" -g3 -gdwarf-4 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g3 -gdwarf-4 -MT elf32-avr.lo -MD -MP -MF .deps/elf32-avr.Tpo -c ../../binutils-gdb/bfd/elf32-avr.c -o elf32-avr.o
> ../../binutils-gdb/bfd/elf32-avr.c:650:5: error: âBFD_RELOC_AVR_DIFF8â undeclared here (not in a function)
>    { BFD_RELOC_AVR_DIFF8,            R_AVR_DIFF8 },
>      ^
> ../../binutils-gdb/bfd/elf32-avr.c:651:5: error: âBFD_RELOC_AVR_DIFF16â undeclared here (not in a function)
>    { BFD_RELOC_AVR_DIFF16,           R_AVR_DIFF16 },
>      ^
> ../../binutils-gdb/bfd/elf32-avr.c:652:5: error: âBFD_RELOC_AVR_DIFF32â undeclared here (not in a function)
>    { BFD_RELOC_AVR_DIFF32,           R_AVR_DIFF32 }
>      ^
> make[4]: *** [elf32-avr.lo] Error 1

The original patch did not include automatically generated files. The
patch below has just those files. Sorry for breaking the build, I
thought excluding the generated files would make the patch easier to

Could someone commit please? I don't have commit access.



2014-04-11  Senthil Kumar Selvaraj  <>

	* Add BFD_RELOC_AVR_DIFF8/16/32.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

diff --git bfd/bfd-in2.h bfd/bfd-in2.h
index cd45d71..f9854ed 100644
--- bfd/bfd-in2.h
+++ bfd/bfd-in2.h
@@ -4460,6 +4460,16 @@ in .byte hi8(symbol)  */
 in .byte hlo8(symbol)  */
+/* AVR relocations to mark the difference of two local symbols.
+These are only needed to support linker relaxation and can be ignored
+when not relaxing.  The field is set to the value of the difference
+assuming no relaxation.  The relocation encodes the position of the
+second symbol so the linker can determine whether to adjust the field
+value.  */
 /* Renesas RL78 Relocations.  */
diff --git bfd/libbfd.h bfd/libbfd.h
index f836f3f..f98a224 100644
--- bfd/libbfd.h
+++ bfd/libbfd.h
@@ -2039,6 +2039,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]