Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Versioned symbols in elfutils and uClibc
@ 2015-04-21  1:30 Max Filippov
  2015-04-21  7:28 ` Thomas Petazzoni
  2015-04-21 11:35 ` Peter Korsgaard
  0 siblings, 2 replies; 6+ messages in thread
From: Max Filippov @ 2015-04-21  1:30 UTC (permalink / raw)
  To: buildroot

Hi,

I'm debugging strange segfault running ltrace for xtensa:
it's caused by dwfl_report_elf recursively calling itself, resulting
in stack overflow. The symbol dwfl_report_elf is versioned, there
are versions ELFUTILS_0.122 and ELFUTILS_0.156, ltrace calls
0.122, but when 0.122 tries to resolve 0.156 it gets back pointer
to 0.122. AFAICS uClibc does not support symbol versioning.
Any idea what can be done about it?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Versioned symbols in elfutils and uClibc
  2015-04-21  1:30 [Buildroot] Versioned symbols in elfutils and uClibc Max Filippov
@ 2015-04-21  7:28 ` Thomas Petazzoni
  2015-04-21 13:56   ` Max Filippov
  2015-04-21 11:35 ` Peter Korsgaard
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-04-21  7:28 UTC (permalink / raw)
  To: buildroot

Max,

On Tue, 21 Apr 2015 04:30:12 +0300, Max Filippov wrote:

> I'm debugging strange segfault running ltrace for xtensa:
> it's caused by dwfl_report_elf recursively calling itself, resulting
> in stack overflow. The symbol dwfl_report_elf is versioned, there
> are versions ELFUTILS_0.122 and ELFUTILS_0.156, ltrace calls
> 0.122, but when 0.122 tries to resolve 0.156 it gets back pointer
> to 0.122. AFAICS uClibc does not support symbol versioning.
> Any idea what can be done about it?

I guess this is probably a question you should ask on the uClibc
mailing list rather than the Buildroot one.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Versioned symbols in elfutils and uClibc
  2015-04-21  1:30 [Buildroot] Versioned symbols in elfutils and uClibc Max Filippov
  2015-04-21  7:28 ` Thomas Petazzoni
@ 2015-04-21 11:35 ` Peter Korsgaard
  2015-04-21 17:59   ` Max Filippov
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2015-04-21 11:35 UTC (permalink / raw)
  To: buildroot

>>>>> "Max" == Max Filippov <jcmvbkbc@gmail.com> writes:

 > Hi,
 > I'm debugging strange segfault running ltrace for xtensa:
 > it's caused by dwfl_report_elf recursively calling itself, resulting
 > in stack overflow. The symbol dwfl_report_elf is versioned, there
 > are versions ELFUTILS_0.122 and ELFUTILS_0.156, ltrace calls
 > 0.122, but when 0.122 tries to resolve 0.156 it gets back pointer
 > to 0.122. AFAICS uClibc does not support symbol versioning.
 > Any idea what can be done about it?

Without knowing much about this, have you tried commenting out the
#ifdef SHARED part in lib/eu-config.h (and possible the corresponding
part in libdwfl/dwfl_report_elf.c)?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Versioned symbols in elfutils and uClibc
  2015-04-21  7:28 ` Thomas Petazzoni
@ 2015-04-21 13:56   ` Max Filippov
  0 siblings, 0 replies; 6+ messages in thread
From: Max Filippov @ 2015-04-21 13:56 UTC (permalink / raw)
  To: buildroot

On Tue, Apr 21, 2015 at 10:28 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Max,
>
> On Tue, 21 Apr 2015 04:30:12 +0300, Max Filippov wrote:
>
>> I'm debugging strange segfault running ltrace for xtensa:
>> it's caused by dwfl_report_elf recursively calling itself, resulting
>> in stack overflow. The symbol dwfl_report_elf is versioned, there
>> are versions ELFUTILS_0.122 and ELFUTILS_0.156, ltrace calls
>> 0.122, but when 0.122 tries to resolve 0.156 it gets back pointer
>> to 0.122. AFAICS uClibc does not support symbol versioning.
>> Any idea what can be done about it?
>
> I guess this is probably a question you should ask on the uClibc
> mailing list rather than the Buildroot one.

I'm asking here because it used to work with buildroot 2014.11,
but does not work now. The difference is in elfutils, back then its
dwfl_report_elf wasn't versioned.

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Versioned symbols in elfutils and uClibc
  2015-04-21 11:35 ` Peter Korsgaard
@ 2015-04-21 17:59   ` Max Filippov
  2015-04-21 21:31     ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Max Filippov @ 2015-04-21 17:59 UTC (permalink / raw)
  To: buildroot

On Tue, Apr 21, 2015 at 2:35 PM, Peter Korsgaard <peter@korsgaard.com> wrote:
>>>>>> "Max" == Max Filippov <jcmvbkbc@gmail.com> writes:
>
>  > Hi,
>  > I'm debugging strange segfault running ltrace for xtensa:
>  > it's caused by dwfl_report_elf recursively calling itself, resulting
>  > in stack overflow. The symbol dwfl_report_elf is versioned, there
>  > are versions ELFUTILS_0.122 and ELFUTILS_0.156, ltrace calls
>  > 0.122, but when 0.122 tries to resolve 0.156 it gets back pointer
>  > to 0.122. AFAICS uClibc does not support symbol versioning.
>  > Any idea what can be done about it?
>
> Without knowing much about this, have you tried commenting out the
> #ifdef SHARED part in lib/eu-config.h (and possible the corresponding
> part in libdwfl/dwfl_report_elf.c)?

It does help, thanks. Looks like this place needs to be patched to
account for missing symbol versioning in uclibc?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Versioned symbols in elfutils and uClibc
  2015-04-21 17:59   ` Max Filippov
@ 2015-04-21 21:31     ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2015-04-21 21:31 UTC (permalink / raw)
  To: buildroot

>>>>> "Max" == Max Filippov <jcmvbkbc@gmail.com> writes:

Hi,

>> Without knowing much about this, have you tried commenting out the
 >> #ifdef SHARED part in lib/eu-config.h (and possible the corresponding
 >> part in libdwfl/dwfl_report_elf.c)?

 > It does help, thanks. Looks like this place needs to be patched to
 > account for missing symbol versioning in uclibc?

Yes, it looks like it. Please consider submitting such patches to
elfutils upstream.

-- 
Bye, Peter Korsgaard 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-21 21:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21  1:30 [Buildroot] Versioned symbols in elfutils and uClibc Max Filippov
2015-04-21  7:28 ` Thomas Petazzoni
2015-04-21 13:56   ` Max Filippov
2015-04-21 11:35 ` Peter Korsgaard
2015-04-21 17:59   ` Max Filippov
2015-04-21 21:31     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox