summaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 45710be7110..fea1244154a 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -863,6 +863,13 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
nbfd, nsec, nval, name);
if (obfd != (bfd *) NULL)
einfo (_("%D: first defined here\n"), obfd, osec, oval);
+
+ if (command_line.relax)
+ {
+ einfo (_("%P: Disabling relaxation: it will not work with multiple definitions\n"));
+ command_line.relax = 0;
+ }
+
return true;
}