public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Question about ELF program headers
@ 2018-02-26 20:38 Douglas Coup
  0 siblings, 0 replies; only message in thread
From: Douglas Coup @ 2018-02-26 20:38 UTC (permalink / raw)
  To: crossgcc

Hello all.

I'm using a cross compiler produced by Crosstools-NG v1.20.0.  The cross 
compiler runs in a 64-bit Intel-based Linux environment, and it produces 
32-bit PowerPC code.  The cross compiler uses gcc v4.4.7.

If I do a "readelf -a" command against the shared object (.so) files 
produced by this cross compiler, I see something like this:

Program Headers:
   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
   LOAD           0x000000 0x00000000 0x00000000 0x9a87c 0x9a87c R E 0x10000
   LOAD           0x09a87c 0x000aa87c 0x000aa87c 0x01344 0x03230 RWE 0x10000
   DYNAMIC        0x09ba84 0x000aba84 0x000aba84 0x000d0 0x000d0 RW  0x4
   GNU_EH_FRAME   0x09a7bc 0x0009a7bc 0x0009a7bc 0x0002c 0x0002c R   0x4
   GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

The problem is that header that's flagged as RWE.  A potential customer 
evaluating some of our software can't use the shared libraries because 
of this.

I tried adding --secure-plt to the gcc commands, but that didn't seem to 
work; the RWE header is still there.

Is there a way to get the cross compiler to stop producing this RWE 
header?  Failing that, is there a way to (safely) modify an already 
produced .so file to change the RWE setting to RW?

I'm kind of new to this world of cross compilers and ELF headers, so I'm 
not sure how best to deal with this.

Regards,

Douglas Coup

-- 
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-26 20:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 20:38 Question about ELF program headers Douglas Coup

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).