summaryrefslogtreecommitdiff
path: root/toolchain/binutils/patches/2.17/502-avr32-bfd-dont-allow-direct-refs-to-bss.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2007-06-08 10:44:01 +0000
committerImre Kaloz <kaloz@openwrt.org>2007-06-08 10:44:01 +0000
commit08c72656130891389229ca29e455e08bc735ce1f (patch)
treef32a71704a40c818fa3ea64efa0aefefc4196a8b /toolchain/binutils/patches/2.17/502-avr32-bfd-dont-allow-direct-refs-to-bss.patch
parent6fb68cb589d76499f5da5902dd83c87722a228f5 (diff)
downloadmtk-20170518-08c72656130891389229ca29e455e08bc735ce1f.zip
mtk-20170518-08c72656130891389229ca29e455e08bc735ce1f.tar.gz
mtk-20170518-08c72656130891389229ca29e455e08bc735ce1f.tar.bz2
add support for the AVR32 platform, namely the ATNGW100 board - joint work with wigyori
SVN-Revision: 7533
Diffstat (limited to 'toolchain/binutils/patches/2.17/502-avr32-bfd-dont-allow-direct-refs-to-bss.patch')
-rw-r--r--toolchain/binutils/patches/2.17/502-avr32-bfd-dont-allow-direct-refs-to-bss.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/toolchain/binutils/patches/2.17/502-avr32-bfd-dont-allow-direct-refs-to-bss.patch b/toolchain/binutils/patches/2.17/502-avr32-bfd-dont-allow-direct-refs-to-bss.patch
new file mode 100644
index 0000000..0a99091
--- /dev/null
+++ b/toolchain/binutils/patches/2.17/502-avr32-bfd-dont-allow-direct-refs-to-bss.patch
@@ -0,0 +1,19 @@
+Index: binutils/bfd/elf32-avr32.c
+===================================================================
+--- binutils/bfd/elf32-avr32.c (revision 24565)
++++ binutils/bfd/elf32-avr32.c (working copy)
+@@ -2446,9 +2446,13 @@
+ after the relaxation code is done, so we can't really
+ trust that our "distance" is correct. There's really no
+ easy solution to this problem, so we'll just disallow
+- direct references to SEC_DATA sections. */
++ direct references to SEC_DATA sections.
++
++ Oh, and .bss isn't actually SEC_DATA, so we disallow
++ !SEC_HAS_CONTENTS as well. */
+ if (!dynamic && defined
+ && !(sym_sec->flags & SEC_DATA)
++ && (sym_sec->flags & SEC_HAS_CONTENTS)
+ && next_state->direct)
+ {
+ next_state = &relax_state[next_state->direct];