]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Handle -z record/ignore as position dependent.
authorUlrich Drepper <drepper@redhat.com>
Sun, 11 Jun 2006 00:53:45 +0000 (00:53 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 11 Jun 2006 00:53:45 +0000 (00:53 +0000)
src/ChangeLog
src/ld.c

index 8bfd20c4ccf2ad22b61c0d286e0707b1b2fd1aff..0c876b6f443e482848a85c4dd7d06a93bec8932d 100644 (file)
@@ -1,6 +1,8 @@
 2006-06-10  Ulrich Drepper  <drepper@redhat.com>
 
        * ld.c (parse_z_option): Recognize execstack and noexecstack.
+       Handle record and ignore as position dependent options.
+       (parse_z_option_2): Handle ignore and record here.
        * ld.h (struct ld_state): Add execstack field.
        * ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
        sections.
index 79efb3ac6899d2d0759a444ddaf197438641b624..a233764fdc03beb0d1478ee0929027b42c15c66f 100644 (file)
--- a/src/ld.c
+++ b/src/ld.c
@@ -925,10 +925,6 @@ parse_z_option (const char *arg)
           /* This is only meaningful if we create a DSO.  */
           && ld_state.file_type == dso_file_type)
     ld_state.dt_flags_1 |= DF_1_NOOPEN;
-  else if (strcmp (arg, "ignore") == 0)
-    ld_state.as_needed = true;
-  else if (strcmp (arg, "record") == 0)
-    ld_state.as_needed = false;
   else if (strcmp (arg, "systemlibrary") == 0)
     ld_state.is_system_library = true;
   else if (strcmp (arg, "execstack") == 0)
@@ -939,7 +935,9 @@ parse_z_option (const char *arg)
           && strcmp (arg, "defaultextract") != 0
           && strcmp (arg, "weakextract") != 0
           && strcmp (arg, "lazyload") != 0
-          && strcmp (arg, "nolazyload") != 0)
+          && strcmp (arg, "nolazyload") != 0
+          && strcmp (arg, "ignore") != 0
+          && strcmp (arg, "record") != 0)
     error (0, 0, gettext ("unknown option `-%c %s'"), 'z', arg);
 }
 
@@ -957,6 +955,10 @@ parse_z_option_2 (const char *arg)
     ld_state.lazyload = true;
   else if (strcmp (arg, "nolazyload") == 0)
     ld_state.lazyload = false;
+  else if (strcmp (arg, "ignore") == 0)
+    ld_state.as_needed = true;
+  else if (strcmp (arg, "record") == 0)
+    ld_state.as_needed = false;
 }