public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Andreas Schwab <schwab@redhat.com>
Cc: David Stubbs <stubbs@icerasemi.com>,
	binutils@sourceware.org, 	Alan Modra <amodra@gmail.com>
Subject: Re: VMA section overlap warnings for overlays
Date: Fri, 25 Feb 2011 16:34:00 -0000	[thread overview]
Message-ID: <AANLkTi=Te44DDZo382o=+44GN-iUuPhecfvD9rV=vQgC@mail.gmail.com> (raw)
In-Reply-To: <m3pqqgkrs0.fsf@redhat.com>

On Fri, Feb 25, 2011 at 8:22 AM, Andreas Schwab <schwab@redhat.com> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> diff --git a/ld/testsuite/ld-elf/dynamic1.d b/ld/testsuite/ld-elf/dynamic1.d
>> new file mode 100644
>> index 0000000..6a8ba55
>> --- /dev/null
>> +++ b/ld/testsuite/ld-elf/dynamic1.d
>> @@ -0,0 +1,10 @@
>> +#ld: -shared -T dynamic1.ld
>> +#readelf: -l --wide
>> +#target: *-*-linux* *-*-gnu*
>> +
>> +#...
>> + Section to Segment mapping:
>> +  Segment Sections...
>> +#...
>> +   0[1-9]     .dynamic[      ]*
>> +#pass
>
> I don't see how that tests anything, this bug is about objcopy.
>

Both readelf and objcpy use ELF_SECTION_IN_SEGMENT_1.
Before the fix:


readelf -l x.so

Elf file type is DYN (Shared object file)
Entry point 0xb0
There are 2 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x00000000000001b0 0x00000000000001b0  RW     200000
  DYNAMIC        0x0000000000000100 0x0000000000000100 0x0000000000000100
                 0x00000000000000b0 0x00000000000000b0  RW     8

 Section to Segment mapping:
  Segment Sections...
   00     .dynsym .dynstr .hash .data1 .dynamic
   01     .data1 .dynamic
            ^^^^^^^

That is equivalent to "The first section in the PT_DYNAMIC segment is
not the .dynamic section".



-- 
H.J.

  reply	other threads:[~2011-02-25 16:34 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16 13:29 David Stubbs
2010-04-21  8:25 ` Alan Modra
2010-04-21 14:44   ` David Stubbs
2010-04-22  1:11     ` Alan Modra
2010-04-22  1:53       ` Alan Modra
2010-04-22 12:39         ` David Stubbs
2010-04-24  2:18           ` Alan Modra
2010-05-07 16:14             ` David Stubbs
2010-05-08 11:49               ` Alan Modra
2010-05-12 13:19                 ` David Stubbs
2010-05-13  3:37                   ` Alan Modra
2010-07-15  8:11             ` Andreas Schwab
2010-07-15 13:10               ` Alan Modra
2010-07-15 13:46                 ` Andreas Schwab
2010-07-15 13:53                   ` H.J. Lu
2010-07-15 14:12                     ` Andreas Schwab
2010-07-15 14:17                       ` H.J. Lu
2010-07-15 14:18                     ` Alan Modra
2010-07-15 14:26                       ` H.J. Lu
2010-07-15 14:36                         ` Andreas Schwab
2010-07-15 19:09                           ` H.J. Lu
2010-07-16  7:39                             ` Andreas Schwab
2010-07-16 10:04                               ` Alan Modra
2010-07-19 12:43                                 ` Andreas Schwab
2010-07-20  5:45                                   ` Alan Modra
2010-07-20 14:11                                     ` Alan Modra
2011-02-24 23:49                                       ` H.J. Lu
2011-02-25  7:49                                         ` Alan Modra
2011-02-25 10:17                                           ` Andreas Schwab
2011-02-25 12:30                                           ` H.J. Lu
2011-02-25 15:55                                           ` H.J. Lu
2011-02-25 16:23                                             ` Andreas Schwab
2011-02-25 16:34                                               ` H.J. Lu [this message]
2010-08-28  1:02         ` H.J. Lu
2010-08-28 11:00           ` Alan Modra
2010-08-28 13:39             ` Alan Modra
2010-08-28 17:25               ` H.J. Lu
2010-08-30  4:46                 ` Alan Modra
2010-08-30  5:11                   ` H.J. Lu
2010-08-30  6:30                     ` Alan Modra

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='AANLkTi=Te44DDZo382o=+44GN-iUuPhecfvD9rV=vQgC@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=schwab@redhat.com \
    --cc=stubbs@icerasemi.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).