When fixups are converted to a difference type within md_apply_fix, we
previously left the contents of VALP (the value that was initially
computed within write.c:fixup_segment) unchanged. This is harmless,
except that this value is used within write.c:fixup_segment once we
return from md_apply_fix to perform an overflow check.
In some cases, the value computed in write.c:fixup_segment is so wrong
that an overflow error can be triggered. These errors are incorrect.
This patch avoids the overflow errors by adjusting the value in
write.c:fixup_segment using the VALP pointer in md_apply_fix.
A test for this issue is included.
gas/ChangeLog:
* config/tc-avr.c (md_apply_fix): Update the contents of VALP for
diff fixups.
gas/testsuite/ChangeLog:
* gas/avr/large-debug-line-table.d: New file.
* gas/avr/large-debug-line-table.s: New file.
+2015-01-10 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * config/tc-avr.c (md_apply_fix): Update the contents of VALP for
+ diff fixups.
+
2015-01-09 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* config/tc-arm.c (arm_cpus): Add support for APM X-Gene 1 and
value = S_GET_VALUE (fixP->fx_addsy) +
fixP->fx_offset - S_GET_VALUE (fixP->fx_subsy);
+ *valP = value;
fixP->fx_subsy = NULL;
}
+2015-01-10 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gas/avr/large-debug-line-table.d: New file.
+ * gas/avr/large-debug-line-table.s: New file.
+
2015-01-01 Alan Modra <amodra@gmail.com>
Update year range in copyright notice of all files.
--- /dev/null
+#name: AVR, large .debug_line table
+#as: -mlink-relax -mmcu=avrxmega2
+#objdump: --dwarf=decodedline
+#source: large-debug-line-table.s
+#target: avr-*-*
+
+.*: file format elf32-avr
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: large-debug-line-table\.c:
+File name Line number Starting address
+large-debug-line-table\.c 1 0
+
+#...
--- /dev/null
+ .file 1 "large-debug-line-table.c"
+ .text
+ .global _start
+_start:
+ .rept 4000
+ .loc 1 1
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ .endr