diff --git a/bfd/elflink.c b/bfd/elflink.c
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
-@@ -14711,6 +14711,10 @@
- }
+@@ -14712,6 +14712,10 @@
+ }
else
- {
-+ if (r_symndx >= rcookie->locsymcount)
-+ /* This can happen with corrupt input. */
-+ return false;
+ {
++ if (r_symndx >= rcookie->locsymcount)
++ /* This can happen with corrupt input. */
++ return false;
+
- /* It's not a relocation against a global symbol,
- but it could be a relocation against a local
- symbol for a discarded section. */
+ /* It's not a relocation against a global symbol,
+ but it could be a relocation against a local
+ symbol for a discarded section. */