OSDN Git Service

GCC properly provides CTOR/DTOR END/LIST symbols already via the normal
[uclinux-h8/elf2flt.git] / ld-elf2flt.in
index f3ad80b..32eb7e0 100644 (file)
@@ -152,6 +152,12 @@ then
                else
                        SEDOP="$SEDOP -e /^SINGLE_LINK:/d"
                fi
+               if [ "@emit_ctor_dtor@" = "yes" ]
+               then
+                       SEDOP="$SEDOP -e s/^TOR://"
+               else
+                       SEDOP="$SEDOP -e /^TOR:/d"
+               fi
                
                # provide a default linker script, we usually need one
                [ -z "$LDSCRIPT" ] && LDSCRIPT="${LDSCRIPTPATH}/elf2flt.ld"