<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/gnu/usr.bin/ld/ld.c, branch release/2.2.8_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>1999-01-21T00:55:30+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>1999-01-21T00:55:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a9e2dc176f709713f9565ed1711c958f0707eb36'/>
<id>a9e2dc176f709713f9565ed1711c958f0707eb36</id>
<content type='text'>
'RELENG_2_2_8_RELEASE'.

This commit was manufactured to restore the state of the 2.2.8-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_2_2_8_RELEASE'.

This commit was manufactured to restore the state of the 2.2.8-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Sync with -current.</title>
<updated>1997-08-08T02:18:14+00:00</updated>
<author>
<name>John Polstra</name>
<email>jdp@FreeBSD.org</email>
</author>
<published>1997-08-08T02:18:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=71f74e3e1d9bca701b6effa8013c8e2be887cebd'/>
<id>71f74e3e1d9bca701b6effa8013c8e2be887cebd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge two bug fixes from main branch:</title>
<updated>1997-02-03T00:50:35+00:00</updated>
<author>
<name>John Polstra</name>
<email>jdp@FreeBSD.org</email>
</author>
<published>1997-02-03T00:50:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d1c849bab39f3b739afa3147807b64dfc239c28c'/>
<id>d1c849bab39f3b739afa3147807b64dfc239c28c</id>
<content type='text'>
    Use xmalloc instead of malloc:
        ld.c            1.38 -&gt; 1.39
        support.c       1.2  -&gt; 1.3

    Fix miscounting of N_INDR (alias) symbols:
        ld.c            1.39 -&gt; 1.40
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    Use xmalloc instead of malloc:
        ld.c            1.38 -&gt; 1.39
        support.c       1.2  -&gt; 1.3

    Fix miscounting of N_INDR (alias) symbols:
        ld.c            1.39 -&gt; 1.40
</pre>
</div>
</content>
</entry>
<entry>
<title>Support for .weak (in addition to the N_INDR stab) for gcc/g++. Also deal</title>
<updated>1996-10-01T01:22:51+00:00</updated>
<author>
<name>Peter Wemm</name>
<email>peter@FreeBSD.org</email>
</author>
<published>1996-10-01T01:22:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0a184df5d7327c266185011a14aa45cbff01c12'/>
<id>d0a184df5d7327c266185011a14aa45cbff01c12</id>
<content type='text'>
with the -R option and store the path in the dynamic header when specified.
The $LD_RUN_PATH environment variable is not checked yet.

While here, split up the code a bit more to enable more selective replacing
of GPL'ed components that are linked with ld.so with others.

Obtained from: NetBSD (mostly, the breakup is my fault)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with the -R option and store the path in the dynamic header when specified.
The $LD_RUN_PATH environment variable is not checked yet.

While here, split up the code a bit more to enable more selective replacing
of GPL'ed components that are linked with ld.so with others.

Obtained from: NetBSD (mostly, the breakup is my fault)
</pre>
</div>
</content>
</entry>
<entry>
<title>General -Wall warning cleanup, part I.</title>
<updated>1996-07-12T19:08:36+00:00</updated>
<author>
<name>Jordan K. Hubbard</name>
<email>jkh@FreeBSD.org</email>
</author>
<published>1996-07-12T19:08:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=526195ad0da110e4a8a5315ec86dddc8e179c06f'/>
<id>526195ad0da110e4a8a5315ec86dddc8e179c06f</id>
<content type='text'>
Submitted-By: Kent Vander Velden &lt;graphix@iastate.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Submitted-By: Kent Vander Velden &lt;graphix@iastate.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Aw c'mon. I'm being driven mad by plenty of other things. I don't</title>
<updated>1996-06-08T04:52:57+00:00</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>1996-06-08T04:52:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a13bb127d28440848246009b673382562f87ccb6'/>
<id>a13bb127d28440848246009b673382562f87ccb6</id>
<content type='text'>
need this.

Consider the following code:

	case 'O':
		output_filename = malloc(strlen(arg)+4);
		strcpy(output_filename, arg);
		strcat(output_filename, ".tmp");
		real_output_filename = arg;
		return;

The idea here is to malloc() a buffer big enough to hold the name of
a supplied file name, plus ".tmp". So we malloc() 'size of filename'
bytes plus 4, right? Wrong! ".tmp" is _FIVE_ bytes long! There's a
traling '\0' which strcat() gleefully tacks on _outside_ the bounds
of the buffer. Result: program corrupts own memory. Program SEGVs at
seemingly random times. Bill not like random SEGVs. Bill smash.

Know how I found this? I've been trying to bootstrap -current on my
2.1.0-RELEASE machine at work and I couldn't seem to get libc.a built
because the linker would intermittently blow chunks while executing
things like 'ld -O foo.o -X -r foo.o'. Since this is an initial
bootstrap version of ld, it was linked against the 2.1.0 libc, who's
malloc() behaves differently than that in -current.

Presumeably ld -O doesn't blow up in -current, otherwise someone would
have spotted this already. I don't know if this is a bug or a feature.

Anyway. I'm changing the strlen(arg)+4 to strlen(arg)+5. Bah.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
need this.

Consider the following code:

	case 'O':
		output_filename = malloc(strlen(arg)+4);
		strcpy(output_filename, arg);
		strcat(output_filename, ".tmp");
		real_output_filename = arg;
		return;

The idea here is to malloc() a buffer big enough to hold the name of
a supplied file name, plus ".tmp". So we malloc() 'size of filename'
bytes plus 4, right? Wrong! ".tmp" is _FIVE_ bytes long! There's a
traling '\0' which strcat() gleefully tacks on _outside_ the bounds
of the buffer. Result: program corrupts own memory. Program SEGVs at
seemingly random times. Bill not like random SEGVs. Bill smash.

Know how I found this? I've been trying to bootstrap -current on my
2.1.0-RELEASE machine at work and I couldn't seem to get libc.a built
because the linker would intermittently blow chunks while executing
things like 'ld -O foo.o -X -r foo.o'. Since this is an initial
bootstrap version of ld, it was linked against the 2.1.0 libc, who's
malloc() behaves differently than that in -current.

Presumeably ld -O doesn't blow up in -current, otherwise someone would
have spotted this already. I don't know if this is a bug or a feature.

Anyway. I'm changing the strlen(arg)+4 to strlen(arg)+5. Bah.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an option -O &lt;filename&gt; to ld.  From the manpage:</title>
<updated>1996-05-28T16:17:48+00:00</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>1996-05-28T16:17:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b5938566d83406e11046c2b6e5bbfd30d437e110'/>
<id>b5938566d83406e11046c2b6e5bbfd30d437e110</id>
<content type='text'>
     -O filename
             Specifies the name of the output file.  The file is created as
             filename.tmp and when output is complete renamed to filename.
This allows us to:
	ld -O ${.TARGET} -x -r ${.TARGET}
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
     -O filename
             Specifies the name of the output file.  The file is created as
             filename.tmp and when output is complete renamed to filename.
This allows us to:
	ld -O ${.TARGET} -x -r ${.TARGET}
</pre>
</div>
</content>
</entry>
<entry>
<title>When a local symbol that would normally be eliminated by "-x" or</title>
<updated>1996-04-24T23:31:08+00:00</updated>
<author>
<name>John Polstra</name>
<email>jdp@FreeBSD.org</email>
</author>
<published>1996-04-24T23:31:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=55e214c197c14b26e23f2061ccc3a4f07b2696d1'/>
<id>55e214c197c14b26e23f2061ccc3a4f07b2696d1</id>
<content type='text'>
"-X" must survive, because of references from relocations, don't
qualify the symbol name with the name of the input file.  This
saves some string space.  It makes libc_pic.a about 2.4% smaller.

Adapted from a suggestion by Bruce Evans.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"-X" must survive, because of references from relocations, don't
qualify the symbol name with the name of the input file.  This
saves some string space.  It makes libc_pic.a about 2.4% smaller.

Adapted from a suggestion by Bruce Evans.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove LD_NOSTD_PATH implementation, it isn't works and</title>
<updated>1995-10-24T06:48:16+00:00</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>1995-10-24T06:48:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a4057ed8d35aa08c6b47448a5007a74bef4d9728'/>
<id>a4057ed8d35aa08c6b47448a5007a74bef4d9728</id>
<content type='text'>
can cause some problems.
Suggested-by: davidg
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
can cause some problems.
Suggested-by: davidg
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix checks for open() failing.  open() may successfully return 0.</title>
<updated>1995-09-28T19:43:22+00:00</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>1995-09-28T19:43:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7da87484dff012527a4e654f88d85e338572963b'/>
<id>7da87484dff012527a4e654f88d85e338572963b</id>
<content type='text'>
ld.c:
Fix a an error message that said that open() failed after fopen() failed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ld.c:
Fix a an error message that said that open() failed after fopen() failed.
</pre>
</div>
</content>
</entry>
</feed>
