From Craig Silverstein: implement -z defs.
authorIan Lance Taylor <iant@google.com>
Thu, 20 Mar 2008 05:22:37 +0000 (05:22 +0000)
committerIan Lance Taylor <iant@google.com>
Thu, 20 Mar 2008 05:22:37 +0000 (05:22 +0000)
gold/options.h
gold/target-reloc.h

index efe92e22fe4729b06b6e9f82f26d516302084dec..22866497353f120be44c41d40eaa2f02497467d7 100644 (file)
@@ -601,6 +601,9 @@ class General_options
   // value, so we need to use different variables for them.
   DEFINE_uint64(common_page_size, options::DASH_Z, '\0', 0,
                 N_("Set common page size to SIZE"), N_("SIZE"));
+  DEFINE_bool(defs, options::DASH_Z, '\0', false,
+              N_("Report undefined symbols (even with --shared)"),
+              NULL);
   DEFINE_bool(execstack, options::DASH_Z, '\0', false,
               N_("Mark output as requiring executable stack"), NULL);
   DEFINE_uint64(max_page_size, options::DASH_Z, '\0', 0,
index c5bb4f1dc7853443188dfec3e57bec3c927c01f5..eab3c37eb4a0605339f24cb6698e0a8544012131 100644 (file)
@@ -217,7 +217,8 @@ relocate_section(
       if (sym != NULL
          && sym->is_undefined()
          && sym->binding() != elfcpp::STB_WEAK
-         && !parameters->options().shared())
+         && (!parameters->options().shared()       // -shared
+              || parameters->options().defs()))     // -z defs
        gold_undefined_symbol(sym, relinfo, i, offset);
 
       if (sym != NULL && sym->has_warning())
This page took 0.025256 seconds and 4 git commands to generate.