[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/996] New: Linking requires one open file per object file
From: |
jepler at sds2 dot com |
Subject: |
[Bug ld/996] New: Linking requires one open file per object file |
Date: |
8 Jun 2005 18:32:41 -0000 |
The script below works when the linker is "GNU ld version 2.13.90.0.18 20030206"
(RedHat 9) but not when it is "GNU ld version 2.16.91 20050608" (CVS HEAD). In
both cases, the compiler used is "gcc version 3.2.2 20030222 (Red Hat Linux
3.2.2-5)".
The reason is that the new ld keeps one file open for each object file, while
the old ld did not---it only ever opened about 15 files.
To switch between linkers, I copied ld-new to /tmp/test/ld and used
COMPILER_PATH=/tmp/test.
I believe this worked (did not regress) with binutils CVS from around 20040924,
but I don't have that tree any longer to test.
My application links in approximately 6000 objects, specifying them through a
single linker script to avoid the kernel command-line limit.
#------------------------------------------------------------------------------
#!/bin/sh
set -ex
mkdir /tmp/linker_test_$$
cd /tmp/linker_test_$$
echo > dummy.c
n=1
while [[ $n -lt 100 ]]
do
gcc -c dummy.c -o dummy$n.o
n=$(($n+1))
done
echo "main() {}" > main.c
ulimit -n 25
gcc main.c dummy*.o
#------------------------------------------------------------------------------
--
Summary: Linking requires one open file per object file
Product: binutils
Version: 2.17 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: jepler at sds2 dot com
CC: bug-binutils at gnu dot org
GCC build triplet: i686-pc-linux
GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux
http://sources.redhat.com/bugzilla/show_bug.cgi?id=996
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/996] New: Linking requires one open file per object file,
jepler at sds2 dot com <=
- [Bug ld/996] Linking requires one open file per object file, jepler at sds2 dot com, 2005/06/08
- [Bug ld/996] Linking requires one open file per object file, mark at codesourcery dot com, 2005/06/08
- [Bug ld/996] Linking requires one open file per object file, mark at codesourcery dot com, 2005/06/08
- [Bug ld/996] Linking requires one open file per object file, mark at codesourcery dot com, 2005/06/08
- [Bug ld/996] Linking requires one open file per object file, mark at codesourcery dot com, 2005/06/09
- [Bug ld/996] Linking requires one open file per object file, jepler at sds2 dot com, 2005/06/09