m68k gcc 3.2, RTEMS 4.5.0, and crtstuff

Aaron J. Grier aaron at frye.com
Fri Nov 22 01:13:18 UTC 2002


gcc/config/m68k/t-crtstuff used to include the line:

EXTRA_PARTS=crtbegin.o crtend.o crti.o crtn.o

somewhere after 1.1 this line was dropped, and the generic t-m68kelf
has only:

EXTRA_PARTS=crtbegin.o crtend.o

which means there's no more crti.o and crtn.o... this caused me some
grief since my linker script has a snippet like this:

		/* to avoid hardcoding in link and unlink opcodes in
		 * here, we steal epilogues and prologues from the
		 * compiler... this also lets us sneak in our own
		 * routines if we want. */
		PROVIDE (_init = .);
		*crti.o(.init)
		*(.init)
		*crtn.o(.init)

		PROVIDE (_fini = .);
		*crti.o(.fini)
		*(.fini)
		*crtn.o(.fini)

the RTEMS script I started with had the function prologues and epilogues
(link and unlk / rts, respectively) hard-coded into this section, which
seemed a little hacky to me, but would explain why other m68k-rtems
haven't run into this...  :)

I'm not sure what the situation is on the other rtems ports; if the
re-addition of crt{i,n} should be added to the global config/t-rtems
level, or somehow just for m68k.

any advice, Joel?  is this of enough concern that I should file an RTEMS
PR?

-- 
  Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron at frye.com



More information about the users mailing list