From 9b14b192bba894ebaa57346c116d8feda54829de Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 14 Sep 2000 01:39:42 +0000 Subject: [PATCH] Disable relaxation if multiple symbol definitions are encountered - otherwise the linker could abort with an assertion failure. --- ld/ChangeLog | 6 ++++++ ld/ldmain.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index 9a093c9a147..bf42f8f56f3 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2000-09-13 Nick Clifton + + * ldmain.c (multiple_definition): Disable relaxation if + multiple symbol definitions are encountered - otherwise the + linker could abort with an assertion failure. + 2000-09-10 Nick Clifton * mri.c: Fix formatting. 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; } -- 2.30.2