diff options
author | Zack Weinberg <zackw@panix.com> | 2005-02-11 23:52:03 +0000 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2005-02-11 23:52:03 +0000 |
commit | 9eabd47532d5452e0506e92e395d0274578c870e (patch) | |
tree | 4c14aac3be9333b646a0f873d5f9cda45f747a53 /ld/emultempl | |
parent | 0e68218d254feeec3cba82819fa5d77baa306b5c (diff) | |
download | gdb-9eabd47532d5452e0506e92e395d0274578c870e.zip gdb-9eabd47532d5452e0506e92e395d0274578c870e.tar.gz gdb-9eabd47532d5452e0506e92e395d0274578c870e.tar.bz2 |
* emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed):
If st.st_ino is zero, do not treat the library as a duplicate.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/elf32.em | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 771a98c..183693e 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -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; |