public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* What do these warnings mean?
@ 2013-02-14 12:35 Gary Thomas
  2013-02-14 12:45 ` Richard Purdie
  2013-02-14 13:10 ` Phil Blundell
  0 siblings, 2 replies; 3+ messages in thread
From: Gary Thomas @ 2013-02-14 12:35 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

I imported libav from meta-oe into my build so I can have additional
gstreamer support.  Now I'm seeing these warnings:

WARNING: QA Issue: ELF binary 
'/home/local/p82_soft/tmp/work/cortexa9-vfp-neon-amltd-linux-gnueabi/gst-plugins-bad/0.10.23-r3.ti1.6.4.3/packages-split/gst-plugins-bad-vp8/usr/lib/gstreamer-0.10/libgstvp8.so' 
has relocations in .text
WARNING: QA Issue: ELF binary '/home/local/p82_soft/tmp/work/cortexa9-vfp-neon-amltd-linux-gnueabi/libav/0.8.3-r0/packages-split/libavcodec/usr/lib/libavcodec.so.53.35.0' has 
relocations in .text

Exactly what do these mean?  What do I do to get rid of them?

Thanks

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------



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

* Re: What do these warnings mean?
  2013-02-14 12:35 What do these warnings mean? Gary Thomas
@ 2013-02-14 12:45 ` Richard Purdie
  2013-02-14 13:10 ` Phil Blundell
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2013-02-14 12:45 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Patches and discussions about the oe-core layer

On Thu, 2013-02-14 at 05:35 -0700, Gary Thomas wrote:
> I imported libav from meta-oe into my build so I can have additional
> gstreamer support.  Now I'm seeing these warnings:
> 
> WARNING: QA Issue: ELF binary 
> '/home/local/p82_soft/tmp/work/cortexa9-vfp-neon-amltd-linux-gnueabi/gst-plugins-bad/0.10.23-r3.ti1.6.4.3/packages-split/gst-plugins-bad-vp8/usr/lib/gstreamer-0.10/libgstvp8.so' 
> has relocations in .text
> WARNING: QA Issue: ELF binary '/home/local/p82_soft/tmp/work/cortexa9-vfp-neon-amltd-linux-gnueabi/libav/0.8.3-r0/packages-split/libavcodec/usr/lib/libavcodec.so.53.35.0' has 
> relocations in .text
> 
> Exactly what do these mean?  What do I do to get rid of them?

It means the linker has to perform relocations on the .text segment at
runtime. This slows down loads and means more memory usage if two
applications use the library since the kernel can't share the mappings.
It will work its just inefficient.

The fix us usually to compile as position independent code using the pic
compiler option.

Cheers,

Richard (far from an expert on this)




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

* Re: What do these warnings mean?
  2013-02-14 12:35 What do these warnings mean? Gary Thomas
  2013-02-14 12:45 ` Richard Purdie
@ 2013-02-14 13:10 ` Phil Blundell
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Blundell @ 2013-02-14 13:10 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Patches and discussions about the oe-core layer

On Thu, 2013-02-14 at 05:35 -0700, Gary Thomas wrote:
> WARNING: QA Issue: ELF binary 
> '/home/local/p82_soft/tmp/work/cortexa9-vfp-neon-amltd-linux-gnueabi/gst-plugins-bad/0.10.23-r3.ti1.6.4.3/packages-split/gst-plugins-bad-vp8/usr/lib/gstreamer-0.10/libgstvp8.so' 
> has relocations in .text
> WARNING: QA Issue: ELF binary '/home/local/p82_soft/tmp/work/cortexa9-vfp-neon-amltd-linux-gnueabi/libav/0.8.3-r0/packages-split/libavcodec/usr/lib/libavcodec.so.53.35.0' has 
> relocations in .text
> 
> Exactly what do these mean?  What do I do to get rid of them?

Generally they mean that some non-PIC code has leaked into a shared
library.  The most common way for that to happen is for a DSO final link
to accidentally pull in some members from a static library.  There are a
few other possible causes as well, mostly toolchain bugs or limitations
(you used to get this under some circumstances when enabling full unwind
tables on MIPS for example), but non-PIC code is the most likely one.

You can use readelf or objdump to inspect the relocation table for the
files in question.  In most cases there is a fairly obvious culprit,
e.g. an R_ARM_PC24 reloc with an incriminating function name. 

Having relocations in .text is undesirable because it wastes memory and
slows down program startup.  They can occasionally cause more severe
problems: for example, if were using SELinux then you might find that
your security policy didn't allow those binaries to be run at all.
(This was the default policy on Fedora for a while; I've no idea if it
still is.)

p.





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

end of thread, other threads:[~2013-02-14 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-14 12:35 What do these warnings mean? Gary Thomas
2013-02-14 12:45 ` Richard Purdie
2013-02-14 13:10 ` Phil Blundell

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