AVR: Only set link-relax elf flag when appropriate.
[external/binutils.git] / gas / config / tc-avr.c
index dfe66c6..bda0bd6 100644 (file)
@@ -25,7 +25,7 @@
 #include "subsegs.h"
 #include "dwarf2dbg.h"
 #include "dw2gencfi.h"
-
+#include "elf/avr.h"
 
 struct avr_opcodes_s
 {
@@ -1848,3 +1848,10 @@ avr_allow_local_subtract (expressionS * left,
      them.  */
   return FALSE;
 }
+
+void
+avr_elf_final_processing (void)
+{
+  if (linkrelax)
+    elf_elfheader (stdoutput)->e_flags |= EF_AVR_LINKRELAX_PREPARED;
+}