* emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed):
authorZack Weinberg <zackw@panix.com>
Fri, 11 Feb 2005 23:52:03 +0000 (23:52 +0000)
committerZack Weinberg <zackw@panix.com>
Fri, 11 Feb 2005 23:52:03 +0000 (23:52 +0000)
If st.st_ino is zero, do not treat the library as a duplicate.

ld/ChangeLog
ld/emultempl/elf32.em

index 3561308cf535bb09c65c021bb7b0904d00e5407b..d00724f93f5ddc4fc09653606cfaee1842043305 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-11  Zack Weinberg  <zack@codesourcery.com>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed):
+       If st.st_ino is zero, do not treat the library as a duplicate.
+
 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
 
        * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
@@ -8,7 +13,7 @@
 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
 
        * scripttempl/armbpabi.sc (VERSION): Make special section symbols
-       local. 
+       local.
        (Image$$ER_RO$$Base): Define whenever RELOCATING.
        (Image$$ER_RO$$Limit): Likewise.
        (SHT$$INIT_ARRAY$$Base): Likewise.
@@ -69,7 +74,7 @@
        (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX.
        (PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx.
        (PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx.
-       (PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX. 
+       (PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX.
        * NEWS: Mention --fix-v4bx.
        * ld.texinfo: Document --fix-v4bx.
 
@@ -80,8 +85,8 @@
        * ld/scripttempl/armbpabi.sc: Move .plt to end of text segment.
        Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}.
        Put .init_array, .fini_array, etc. into the read-only data
-       segment. 
-       
+       segment.
+
 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
 
        * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
index 771a98c0d226b650cd0af9ff3972bea5821213dd..183693ea809dabf75e300eef36b9c32bacd88158 100644 (file)
@@ -231,8 +231,16 @@ gld${EMULATION_NAME}_stat_needed (lang_input_statement_type *s)
       return;
     }
 
+  /* Some operating systems, e.g. Windows, do not provide a meaningful
+     st_ino; they always set it to zero.  (Windows does provide a
+     meaningful st_dev.)  Do not indicate a duplicate library in that
+     case.  While there is no guarantee that a system that provides
+     meaningful inode numbers will never set st_ino to zero, this is
+     merely an optimization, so we do not need to worry about false
+     negatives.  */
   if (st.st_dev == global_stat.st_dev
-      && st.st_ino == global_stat.st_ino)
+      && st.st_ino == global_stat.st_ino
+      && st.st_ino != 0)
     {
       global_found = TRUE;
       return;
This page took 0.026167 seconds and 4 git commands to generate.