aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-03-31 12:54:38 +0100
committerNick Clifton <nickc@redhat.com>2017-03-31 12:54:38 +0100
commitdc1e4d6dedcb8ee3bb195f0db711f6aa164b8ab4 (patch)
tree37dfaa900cbf52d5ba534b21d760a5263c73decc /gas
parent938ec663b8ec03336bd0387ee8f8d6f18f199025 (diff)
downloadgdb-dc1e4d6dedcb8ee3bb195f0db711f6aa164b8ab4.zip
gdb-dc1e4d6dedcb8ee3bb195f0db711f6aa164b8ab4.tar.gz
gdb-dc1e4d6dedcb8ee3bb195f0db711f6aa164b8ab4.tar.bz2
Reduce the size of s390 symbol tables by allowing relocations in mergeable string sections (eg .debug_str) to be made section relative rather than symbol relative.
PR gas/21333 * config/tc-s390.c (tc_s390_fix_adjustable): Allow non pc-relative fixups in mergeable sections to be adjusted.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-s390.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a5c1d08..10785d4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-31 Nick Clifton <nickc@redhat.com>
+
+ PR gas/21333
+ * config/tc-s390.c (tc_s390_fix_adjustable): Allow non pc-relative
+ fixups in mergeable sections to be adjusted.
+
2017-03-30 Pip Cet <pipcet@gmail.com>
* config/tc-wasm32.h: New file: Add WebAssembly assembler target.
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 35cee61..40c9f6f 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -2133,9 +2133,11 @@ md_pcrel_from_section (fixS *fixp, segT sec ATTRIBUTE_UNUSED)
int
tc_s390_fix_adjustable (fixS *fixP)
{
- /* Don't adjust references to merge sections. */
- if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0)
+ /* Don't adjust pc-relative references to merge sections. */
+ if (fixP->fx_pcrel
+ && (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0)
return 0;
+
/* adjust_reloc_syms doesn't know about the GOT. */
if ( fixP->fx_r_type == BFD_RELOC_16_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_32_GOTOFF