delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/26/14:02:34

Xref: news2.mv.net comp.os.msdos.djgpp:6445
From: Mark Habersack <grendel AT ananke DOT amu DOT edu DOT pl>
Newsgroups: comp.os.msdos.djgpp
Subject: __attribute__((section))
Date: Fri, 26 Jul 1996 17:31:05 +0200
Organization: Adam Mickiewicz University
Lines: 29
Message-ID: <Pine.NEB.3.93.960726171833.18376B-100000@ananke.amu.edu.pl>
NNTP-Posting-Host: ananke.amu.edu.pl
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Messing up with sections of COFF images produced by djgpp I tried to put some
data into the separate section using the (section) attribute. Unfortunately
gcc aborts saying that "current target doesn't support sections" (not the
exact message but the meaning is the same). So how it is? Object files output
by gcc are COFF, right? They support many sections and put no restriction on
that. On the other hand there's an a.out format (default output file name
"a.out" would suggest that djgpp uses this format) which does not allow for
multiple sections. This is confirmed by the message gcc displays when I try to
use (section) attribute. But gas & ld let me define and create as many
separate sections as I can dream. So where's the truth? Does djgpp produce
a.out or COFF objects?
For one moment I suspected that I cannot use __attribute__(section) because
djgpp doesn't know how to switch data segments, which would be necessary to
acces the data in other sections which are not in the same address
space as BSS & DATA (but then it is only a matter of an entry in djgpp.ld,
isn't it? Of course, it is not possible to specify any section by default in
that script, but that should not impose any restrictions on the compiler
itself) - is that the reason? 

Mark

 /*******************************/
/** So here I am once more... **************************************/
/** When you grown up and leave your playground, where you kissed **/
/** your Prince and found your Frog - remember the Jester that    **/
/** showed you tears, a Script for Tears... ************************/
/*********************************************/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019