linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Compiling kernel with -g option.
@ 2001-11-07  0:12 Subodh Nijsure
  2001-11-07  0:56 ` Tom Rini
  2001-11-07 13:56 ` Jerry Van Baren
  0 siblings, 2 replies; 5+ messages in thread
From: Subodh Nijsure @ 2001-11-07  0:12 UTC (permalink / raw)
  To: linuxppc-embedded


Sorry if this is "basic" question but I looked through mailing and couldn't
find a solution.

When I compile kernel and some of my own modules together I get tons
of error like --

relocation truncated to fit: R_PPC_REL24 copy_to_user
..
..

However if I compile everything with -O2 options everything works fine,
any way I can fix this so I can debug things....

Thanks.

/Subodh


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: Compiling kernel with -g option.
@ 2001-11-07 17:11 Wright, David
  0 siblings, 0 replies; 5+ messages in thread
From: Wright, David @ 2001-11-07 17:11 UTC (permalink / raw)
  To: Jerry Van Baren, linuxppc-embedded


> -----Original Message-----
> From: Jerry Van Baren [mailto:vanbaren_gerald@si.com]
> Relocation truncated to fit errors are typically caused by
> your executable exceeding 16Mbytes (24 bits) in size (assuming
> it isn't caused by missing modules and thus unresolved references).

In this case, however, it was clear that the problem WAS due to
unresolved references -- specifically, the "copy_to_user" refs.
That's always going to happen if you turn off optimization, because
those are inlined functions, and you have to use at least -O1 to
get those to be compiled as inlines (at least with gcc).

I've never seen a 16 MB linux kernel, even with -g turned on; I
guess you might be able to do it if you enabled every driver and
option, but my mid-sized vmlinux, with -g, is 8 MB.

  -- David Wright, Consulting Engineer, InfiniSwitch Corp.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <FF6CF34C346E724596A2FB5CAAB2C49750C5C0@voyager.ops.infinis witch.com>]

end of thread, other threads:[~2001-11-07 17:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-07  0:12 Compiling kernel with -g option Subodh Nijsure
2001-11-07  0:56 ` Tom Rini
2001-11-07 13:56 ` Jerry Van Baren
  -- strict thread matches above, loose matches on Subject: below --
2001-11-07 17:11 Wright, David
     [not found] <FF6CF34C346E724596A2FB5CAAB2C49750C5C0@voyager.ops.infinis witch.com>
2001-11-07 17:33 ` Jerry Van Baren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).