darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Add -dead_strip and -no_dead_strip_inits_an...
authorDevang Patel <dpatel@apple.com>
Wed, 11 Aug 2004 21:26:12 +0000 (14:26 -0700)
committerDevang Patel <dpatel@gcc.gnu.org>
Wed, 11 Aug 2004 21:26:12 +0000 (14:26 -0700)
       * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Add -dead_strip
       and -no_dead_strip_inits_and_terms.
       (LINK_SPEC): Same.
       * doc/invoke.texi (Darwin Options): Document -dead_strip and
       -no_dead_strip_inits_and_terms.

       * gcc.dg/darwin-ld-20040809-1.c: New test.
       * gcc.dg/darwin-ld-20040809-2.c: New test.

From-SVN: r85822

gcc/ChangeLog
gcc/config/darwin.h
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/darwin-ld-20040809-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/darwin-ld-20040809-2.c [new file with mode: 0644]

index b3aa2f3cf072e2513f963acc1f3fd26c80ea2924..def29f3770366d6b3c58e12541a9b9b93b9bb665 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-11 Devang Patel  <dpatel@apple.com>
+
+       * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Add -dead_strip
+       and -no_dead_strip_inits_and_terms.
+       (LINK_SPEC): Same.
+       * doc/invoke.texi (Darwin Options): Document -dead_strip and
+       -no_dead_strip_inits_and_terms.
+       
 2004-08-11  Paul Brook  <paul@codesourcery.com>
 
        * config/arm/arm-protos.h (arm_finalize_pic) Rename ...
index cb84eb12473d85f221fed0ec1d6ec017878ac732..764983030cfe6a56b402fc10af1a37f6e9a3d3cf 100644 (file)
@@ -109,6 +109,8 @@ Boston, MA 02111-1307, USA.  */
   { "-bundle", "-Zbundle" },  \
   { "-bundle_loader", "-Zbundle_loader" },  \
   { "-weak_reference_mismatches", "-Zweak_reference_mismatches" },  \
+  { "-dead_strip", "-Zdead_strip" }, \
+  { "-no_dead_strip_inits_and_terms", "-Zno_dead_strip_inits_and_terms" }, \
   { "-dependency-file", "-MF" }, \
   { "-dylib_file", "-Zdylib_file" }, \
   { "-dynamic", "-Zdynamic" },  \
@@ -251,6 +253,8 @@ extern const char *darwin_one_byte_bool;
    %{Zallowable_client*:-allowable_client %*} \
    %{Zbind_at_load:-bind_at_load} \
    %{Zarch_errors_fatal:-arch_errors_fatal} \
+   %{Zdead_strip:-dead_strip} \
+   %{Zno_dead_strip_inits_and_terms:-no_dead_strip_inits_and_terms} \
    %{Zdylib_file*:-dylib_file %*} \
    %{Zdynamic:-dynamic}\
    %{Zexported_symbols_list*:-exported_symbols_list %*} \
index bf41ffb426a636bfc9596e7e059eab3fee26b365..9c2704a1b72c9d51fbb0206ca10fb6c5460ad4bd 100644 (file)
@@ -407,13 +407,15 @@ in the following sections.
 @gccoptlist{-all_load  -allowable_client  -arch  -arch_errors_fatal @gol
 -arch_only  -bind_at_load  -bundle  -bundle_loader @gol
 -client_name  -compatibility_version  -current_version @gol
+-dead_strip @gol
 -dependency-file  -dylib_file  -dylinker_install_name @gol
 -dynamic  -dynamiclib  -exported_symbols_list @gol
 -filelist  -flat_namespace  -force_cpusubtype_ALL @gol
 -force_flat_namespace  -headerpad_max_install_names @gol
 -image_base  -init  -install_name  -keep_private_externs @gol
 -multi_module  -multiply_defined  -multiply_defined_unused @gol
--noall_load  -nofixprebinding -nomultidefs  -noprebind  -noseglinkedit @gol
+-noall_load   -no_dead_strip_inits_and_terms @gol
+-nofixprebinding -nomultidefs  -noprebind  -noseglinkedit @gol
 -pagezero_size  -prebind  -prebind_all_twolevel_modules @gol
 -private_bundle  -read_only_relocs  -sectalign @gol
 -sectobjectsymbols  -whyload  -seg1addr @gol
@@ -7008,6 +7010,7 @@ output file being linked. See man ld(1) for more information.
 @itemx -client_name
 @itemx -compatibility_version
 @itemx -current_version
+@itemx -dead_strip
 @itemx -dependency-file
 @itemx -dylib_file
 @itemx -dylinker_install_name
@@ -7027,6 +7030,7 @@ output file being linked. See man ld(1) for more information.
 @itemx -multiply_defined
 @itemx -multiply_defined_unused
 @itemx -noall_load
+@items -no_dead_strip_inits_and_terms
 @itemx -nofixprebinding
 @itemx -nomultidefs
 @itemx -noprebind
@@ -7065,6 +7069,7 @@ output file being linked. See man ld(1) for more information.
 @opindex client_name
 @opindex compatibility_version
 @opindex current_version
+@opindex dead_strip
 @opindex dependency-file
 @opindex dylib_file
 @opindex dylinker_install_name
@@ -7084,6 +7089,7 @@ output file being linked. See man ld(1) for more information.
 @opindex multiply_defined
 @opindex multiply_defined_unused
 @opindex noall_load
+@opindex no_dead_strip_inits_and_terms
 @opindex nofixprebinding
 @opindex nomultidefs
 @opindex noprebind
index e99a8cc825f3c563dca4c9bae968abc2a3930b01..c4226dc7b0acd399b18f917ddfd2e6aaee00f20f 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-11  Devang Patel  <dpatel@apple.com>
+
+       * gcc.dg/darwin-ld-20040809-1.c: New test.
+       * gcc.dg/darwin-ld-20040809-2.c: New test.
+       
 2004-08-11  Steven G. Kargl  <kargls@comcast.net>
 
        PR fortran/16917
diff --git a/gcc/testsuite/gcc.dg/darwin-ld-20040809-1.c b/gcc/testsuite/gcc.dg/darwin-ld-20040809-1.c
new file mode 100644 (file)
index 0000000..c54a4aa
--- /dev/null
@@ -0,0 +1,13 @@
+/* Test -dead_strip support.  */
+/* Contributed by Devang Patel  <dpatel@apple.com>  */
+
+/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-options "-dead_strip" } */
+
+
+int
+main ()
+{
+  return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/darwin-ld-20040809-2.c b/gcc/testsuite/gcc.dg/darwin-ld-20040809-2.c
new file mode 100644 (file)
index 0000000..73d788d
--- /dev/null
@@ -0,0 +1,12 @@
+/* Test -no_dead_strip_inits_and_terms support. */
+/* Contributed by Devang Patel  <dpatel@apple.com>  */
+
+/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-options "-no_dead_strip_inits_and_terms" } */
+
+int
+main ()
+{
+  return 0;
+}
+