program headers linker script

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

I read the section about headers in the gnu linker document. But it
remains a mystery to me. Why would you use headers. When do you decide
that a section gets assigned to a new program header ?


Re: program headers linker script
by "headers", I assume you mean a header, or a *.h file...  if you will ever
notice, a header file (although I have seen this abused), never contains
executable code, just compiler directives (those are the things that start
with a # sign, such as #define, #pragma, #include, etc.) ..........  i have
seen executable code in a header file, but i personally consider it very bad
practice..   Why would you use headers?  to keep your little compiler
fuck-yous away from the actual code, is the best way I can think of putting

Quoted text here. Click to load it

Re: program headers linker script

Quoted text here. Click to load it

The headers are needed for loading. The simplest is you have a
text,data and bss section in your file.
But if you have something special in your file, you might want to tell
the loader where to find it (e.g. a relocation table).

Do not email to, it's a spam-only account :-)
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline