program headers linker script

Hi,

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 ?

Tom

Reply to
Tom
Loading thread data ...

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 f*ck-yous away from the actual code, is the best way I can think of putting it........

Reply to
Clark G. Smith

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

--
42Bastian
Do not email to bastian42@yahoo.com, it's a spam-only account :-)
Use @epost.de instead !
Reply to
42Bastian Schick

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.