bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binutils-doc 2.15-5: glitches in ld.info


From: Alan Modra
Subject: Re: binutils-doc 2.15-5: glitches in ld.info
Date: Sun, 23 Jan 2005 18:13:06 +1030
User-agent: Mutt/1.4i

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 @address@hidden marks the start of the global
-constructors, and the symbol @address@hidden marks the end.  The
+constructors, and the symbol @address@hidden marks the end.
+Similarly, @address@hidden and @address@hidden 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 via email to

[Prev in Thread] Current Thread [Next in Thread]