public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Dual Mode Binaries
@ 2009-12-05 18:59 Brian D. McGrew
  2009-12-05 20:57 ` Joel Dice
  0 siblings, 1 reply; 5+ messages in thread
From: Brian D. McGrew @ 2009-12-05 18:59 UTC (permalink / raw)
  To: gcc-help

Good morning!

I've googled all I can think of and perhaps I'm not searching the correct
keywords, or it can't be done...

I'm looking to create a dual-mode binary for 32-bit and 64-bit Linux in the
same executable...  Similar to the way Apple puts out dual mode binaries for
PPC and Intel.

Can this be done with gcc-4.4.2???  If so, where can I find the howto's?

-b

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

* Re: Dual Mode Binaries
  2009-12-05 18:59 Dual Mode Binaries Brian D. McGrew
@ 2009-12-05 20:57 ` Joel Dice
  2009-12-06  3:12   ` Kalle Olavi Niemitalo
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Dice @ 2009-12-05 20:57 UTC (permalink / raw)
  To: Brian D. McGrew; +Cc: gcc-help

On Sat, 5 Dec 2009, Brian D. McGrew wrote:

> Good morning!
>
> I've googled all I can think of and perhaps I'm not searching the correct
> keywords, or it can't be done...
>
> I'm looking to create a dual-mode binary for 32-bit and 64-bit Linux in the
> same executable...  Similar to the way Apple puts out dual mode binaries for
> PPC and Intel.
>
> Can this be done with gcc-4.4.2???  If so, where can I find the howto's?

This may be what you're looking for:

http://icculus.org/fatelf/

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

* Re: Dual Mode Binaries
  2009-12-05 20:57 ` Joel Dice
@ 2009-12-06  3:12   ` Kalle Olavi Niemitalo
  2009-12-06  3:53     ` Tim Prince
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Olavi Niemitalo @ 2009-12-06  3:12 UTC (permalink / raw)
  To: Brian D. McGrew; +Cc: gcc-help

Joel Dice <dicej@mailsnare.net> writes:

> This may be what you're looking for:
>
> http://icculus.org/fatelf/

Those patches were not accepted into Linux and glibc,
and the author gave up.

http://osnews.com/story.php/22446/Ryan_Gordon_Halts_FatELF_Project

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

* Re: Dual Mode Binaries
  2009-12-06  3:12   ` Kalle Olavi Niemitalo
@ 2009-12-06  3:53     ` Tim Prince
  2009-12-07  1:40       ` Kalle Olavi Niemitalo
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Prince @ 2009-12-06  3:53 UTC (permalink / raw)
  To: Kalle Olavi Niemitalo; +Cc: Brian D. McGrew, gcc-help

Kalle Olavi Niemitalo wrote:
> Joel Dice <dicej@mailsnare.net> writes:
> 
>> This may be what you're looking for:
>>
>> http://icculus.org/fatelf/
> 
> Those patches were not accepted into Linux and glibc,
> and the author gave up.
> 
> http://osnews.com/story.php/22446/Ryan_Gordon_Halts_FatELF_Project
The incentive for combining 32- and 64-bit binaries is mighty slim; in 
most cases where 32-bit is satisfactory, the 32-bit code runs as well or 
better on the 64-bit OS, while the larger size binary detracts from any 
advantage.
gcc has survived without providing much support for multiple paths, e.g. 
  non-SSE, SSE3, ... where the incentive might have been greater.

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

* Re: Dual Mode Binaries
  2009-12-06  3:53     ` Tim Prince
@ 2009-12-07  1:40       ` Kalle Olavi Niemitalo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Olavi Niemitalo @ 2009-12-07  1:40 UTC (permalink / raw)
  To: tprince; +Cc: Brian D. McGrew, gcc-help

Tim Prince <n8tm@aol.com> writes:

> gcc has survived without providing much support for multiple paths,
> e.g. non-SSE, SSE3, ... where the incentive might have been greater.

For those, the upcoming ifunc attribute should be a better fit,
as it allows compiling multiple variants of only the real
hotspots and sharing all the rest.  The downside is that ifunc
requires changes in the source code, rather than only compiler
options.

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

end of thread, other threads:[~2009-12-06 12:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-05 18:59 Dual Mode Binaries Brian D. McGrew
2009-12-05 20:57 ` Joel Dice
2009-12-06  3:12   ` Kalle Olavi Niemitalo
2009-12-06  3:53     ` Tim Prince
2009-12-07  1:40       ` Kalle Olavi Niemitalo

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