From: Ulrich Drepper Date: Sun, 11 Jun 2006 00:53:45 +0000 (+0000) Subject: Handle -z record/ignore as position dependent. X-Git-Tag: elfutils-0.121~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f0a7a89be199fa86d9c5c7a56f4be9c5cfb2a4e;p=thirdparty%2Felfutils.git Handle -z record/ignore as position dependent. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8bfd20c4c..0c876b6f4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2006-06-10 Ulrich Drepper * 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. diff --git a/src/ld.c b/src/ld.c index 79efb3ac6..a233764fd 100644 --- 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; }