public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: Edward Welbourne <eddy@opera.com>
Cc: bug-binutils@gnu.org, binutils@sources.redhat.com
Subject: Re: binutils-doc 2.15-5: glitches in ld.info
Date: Sun, 23 Jan 2005 07:43:00 -0000	[thread overview]
Message-ID: <20050123074306.GB18895@bubble.modra.org> (raw)
In-Reply-To: <E1Crf48-0008TJ-00@whorl.oslo.opera.com>

On Thu, Jan 20, 2005 at 05:21:48PM +0100, Edward Welbourne wrote:
> I have version 2.15-5 of the binutils-doc package as shipped with
> Debian/sarge.  I was reading up on Linker Scripts in the ld info pages
> and noticed what I suppose to be some errors;

Thanks.  The CONSTRUCTOR paragraph is wrong, fixed by the following.

	* ld.texinfo (Output Section Keywords <CONSTRUCTORS>): Correct
	__DTOR_LIST__ description.

>        extern char __load_start_text1, __load_stop_text1;
>        memcpy ((char *) 0x1000, &__load_start_text1,
>                &__load_stop_text1 - &__load_start_text1);

However, this example is correct, and your suggested change

>        extern char *__load_start_text1, *__load_stop_text1;
>        memcpy ((char *) 0x1000, __load_start_text1,
>                __load_stop_text1 - __load_start_text1);

won't work like you think it will..

Index: ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.136
diff -u -p -r1.136 ld.texinfo
--- ld.texinfo	23 Jan 2005 05:36:37 -0000	1.136
+++ ld.texinfo	23 Jan 2005 07:37:22 -0000
@@ -3396,7 +3396,9 @@ linker to place constructor information 
 ignored for other object file formats.
 
 The symbol @w{@code{__CTOR_LIST__}} marks the start of the global
-constructors, and the symbol @w{@code{__DTOR_LIST}} marks the end.  The
+constructors, and the symbol @w{@code{__CTOR_END__}} marks the end.
+Similarly, @w{@code{__DTOR_LIST__}} and @w{@code{__DTOR_END__}} mark
+the start and end of the global destructors.  The
 first word in the list is the number of entries, followed by the address
 of each constructor or destructor, followed by a zero word.  The
 compiler must arrange to actually run the code.  For these object file

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

       reply	other threads:[~2005-01-23  7:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1Crf48-0008TJ-00@whorl.oslo.opera.com>
2005-01-23  7:43 ` Alan Modra [this message]
2005-01-24 10:53   ` Edward Welbourne
2005-01-24 19:03     ` Ian Lance Taylor
2005-01-24 22:47       ` Edward Welbourne
2005-02-01 12:34         ` Nick Clifton
2005-02-01 14:49           ` Edward Welbourne
2005-02-01 17:30             ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050123074306.GB18895@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=bug-binutils@gnu.org \
    --cc=eddy@opera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).