]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/config/tc-arm.c
Generate a warning in the ARM assembler if a PC-relative thumb load instruction is...
[thirdparty/binutils-gdb.git] / gas / config / tc-arm.c
index 59b1f6b3f539746fe7ba513ea26d6ed5b916d3dc..329a2de10714843684d01e6f87ed622b7c968ba3 100644 (file)
@@ -29290,6 +29290,9 @@ md_apply_fix (fixS *    fixP,
                          (((unsigned long) fixP->fx_frag->fr_address
                            + (unsigned long) fixP->fx_where) & ~3)
                          + (unsigned long) value);
+         else if (get_recorded_alignment (seg) < 2)
+           as_warn_where (fixP->fx_file, fixP->fx_line,
+                          _("section does not have enough alignment to ensure safe PC-relative loads"));
 
          if (value & ~0x3fc)
            as_bad_where (fixP->fx_file, fixP->fx_line,