[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc (Re: porting?)
- To: unlisted-recipients:;@terminator.rs.itd.umich.edu (no To-header on input)
- Subject: Re: gcc (Re: porting?)
- From: Mikko Larjava <mitala@nic.funet.fi>
- Date: Tue, 10 Feb 1998 17:34:16 +0200 (EET)
- Cc: MiNT mailing list <mint@atari.archive.umich.edu>
- In-reply-to: <Pine.GSO.3.96.980210115700.10756A-100000@sun1>
- Sender: mitala@nic.funet.fi
On Tue, 10 Feb 1998, Jan Paul Schmidt wrote:
> On Fri, 6 Feb 1998, Tamminen Eero wrote:
> > What about -mpcrel? Doesn't it do (about) the same thing?
> >
> > I usually use '-mbaserel -mpcrel -fomit-frame-pointer -O2' as
> > it produces the smallest code (GCCs <= 2.5.8).
>
> I use that to on 2.7.2.3, but it won't work always with larger stuff.
What does the -mpcrel actually do? At least newer gcc's use pc relative
addressing when possible anyway. -mbaserel is sensitive for const stuff.
If there's 'const int something = 1;' statement somewhere and it is also
used on other file and declared as 'extern int something;' linking
doesn't work. The variable is allocated in text section and addressed
as absolute mode but the 'extern int' without const means that it is
allocated in data or bss sections and addressed as relative to base
register. 'extern const int something;' fixes things.
I was just wondering can the sys_errlist[] be declared as
extern const char *const sys_errlist[];
or is there some kind of standard for it? That would give as a chance to
keep the whole array on text section which would save that valuable data
and bss for other things with baserel. There's probably other similar
things in the mintlib. e.g. localtim.c has two too big static arrays.
--
** One of those Atari archive maintainers at ftp.funet.fi