public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: marco atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: rebase segfault
Date: Tue, 15 Jan 2013 22:04:00 -0000	[thread overview]
Message-ID: <50F5D246.6010902@gmail.com> (raw)
In-Reply-To: <20130115112406.GA13752@calimero.vinschen.de>

On 1/15/2013 12:24 PM, Corinna Vinschen wrote:
> On Jan 15 11:36, marco atzeri wrote:
>> On 1/15/2013 11:07 AM, Corinna Vinschen wrote:
>>> On Jan 15 09:43, marco atzeri wrote:
>>>> rebase is segfaulting on two dlls of new package
>>>>
>>>> postgresql-contrib-9.2.2-1
>>>>
>>>> Full packages here
>>>> http://matzeri.altervista.org/cygwin-1.7/postgresql/
>>>>
>>>> Just the two dll's here:
>>>> http://matzeri.altervista.org/works/rebase/
>>>>
>>>> for i in *.dll; do echo $i ; rebase -O  $i ; done
>>>>
>>>> dict_snowball.dll
>>>> Segmentation fault (core dumped)
>>>>
>>>> ltree.dll
>>>> Segmentation fault (core dumped)
>>>
>>> I don't know exactly what's going on here, but there's a common
>>> factor:
>>> [...]
>>> Both DLLs have a section .gnu_deb, whatever that one is good for.
>>> Rebase crashes both times when trying to relocate this .gnu_deb section.
>>> As you can see, the .gnu_deb section is pretty small, only 28 resp. 20
>>> bytes.  What happens is that the relocation information for the .gnu_deb
>>> section appears to be too big.  In case of dict_snowball.dll, the reloc
>>> info covers 44 relocation entries.  The segfault occurs as soon as one
>>> entry translates into a memory address which is beyond the committed
>>> area of the file memory map.
>>> [...]
>>
>> It seems the result of the .dbg creation, that trunks
>> wrongly the sections.
>> [...]
>> for what I can see a dll with debug symbols
>> should have a .gnu_debuglink sections:
>
> Right.  Something's scrambled.  AFAIK, the .gnu_debuglink is not
> relocatable, it only contains a path.  ".gnu_deb" appears to be
> a result of using only the fixed 8 bytes of the section name.
> Yaakov, do you have any idea what's going on here?

it seems that objcopy is considering the

    --long-section-names {enable|disable|keep}

as disable (or keeping an incorrect disable)

using in sequence on a stripped ltree.dll

$ objcopy -v  --add-gnu-debuglink="ltree.dll.dbg" ltree.dll
$ objcopy -v --long-section-names enable 
--add-gnu-debuglink="ltree.dll.dbg" ltree.dll

$ objdump -h ltree.dll

ltree.dll:     file format pei-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
   0 .text         000088a8  6fc81000  6fc81000  00000400  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
   1 .data         00000dc0  6fc8a000  6fc8a000  00008e00  2**5
                   CONTENTS, ALLOC, LOAD, DATA
   2 .bss          000000f8  6fc8b000  6fc8b000  00000000  2**5
                   ALLOC
   3 .edata        00000e3c  6fc8c000  6fc8c000  00009c00  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   4 .idata        000005b8  6fc8d000  6fc8d000  0000ac00  2**2
                   CONTENTS, ALLOC, LOAD, DATA
   5 .reloc        00000adc  6fc8e000  6fc8e000  0000b200  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   6 .gnu_deb      00000014  6fc8f000  6fc8f000  0000be00  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   7 .gnu_debuglink 00000014  6fc90000  6fc90000  0000c000  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA


I consider this a bug of objcopy:
   "--add-gnu-debuglink" should imply "--long-section-names enable"

>
>
> Corinna
>
Regards
MArco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2013-01-15 22:04 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  8:44 marco atzeri
2013-01-15 10:08 ` Corinna Vinschen
2013-01-15 10:36   ` marco atzeri
2013-01-15 11:24     ` Corinna Vinschen
2013-01-15 22:04       ` marco atzeri [this message]
2013-01-16  7:16         ` marco atzeri
2013-01-16 12:35           ` Binutils objcopy bug (was Re: rebase segfault) Corinna Vinschen
2013-01-16 13:38             ` marco atzeri
2013-01-16 14:42               ` Corinna Vinschen
2013-01-16 15:12                 ` marco atzeri
2013-01-16 16:26                   ` Corinna Vinschen
2013-01-24  9:02               ` Yaakov
2013-01-24  9:28                 ` Corinna Vinschen
2013-01-24  9:49                   ` marco atzeri
2013-01-24 10:01                     ` Corinna Vinschen
2013-01-24 10:16                       ` marco atzeri
2013-01-24 12:09                         ` Corinna Vinschen
2013-01-24 12:35                           ` marco atzeri
2013-01-24 14:12                             ` Corinna Vinschen
2013-01-25 12:34                       ` marco atzeri
2013-01-25 13:20                         ` Kai Tietz
2013-01-25 15:01                           ` Corinna Vinschen
2013-01-25 15:12                             ` marco atzeri
2013-01-26  6:32                               ` Reini Urban
2013-01-26  7:53                                 ` marco atzeri
2013-01-29 22:30                                   ` Reini Urban
2013-01-30 16:46                                     ` Andrew Dunstan
2013-01-30 17:03                                       ` marco atzeri
2013-03-04 20:01                                       ` Andrew Dunstan
2013-03-04 21:30                                         ` marco atzeri
2013-03-04 21:41                                           ` Andrew Dunstan
2013-03-04 22:32                                           ` Andrew Dunstan
2013-03-05  5:42                                             ` marco atzeri
2013-03-05 15:39                                               ` Andrew Dunstan
2013-01-25 13:22                         ` Kai Tietz
2013-01-24 15:56                     ` Christopher Faylor
2013-01-24 16:17                       ` marco atzeri
2013-01-18 15:34             ` marco atzeri
2013-01-18 15:44               ` Christopher Faylor
2013-01-19  8:56             ` marco atzeri
2013-01-19 15:23               ` Corinna Vinschen

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=50F5D246.6010902@gmail.com \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.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).