mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] Remove section .text.lock
@ 2001-12-27  4:10 Keith Owens
  0 siblings, 0 replies; only message in thread
From: Keith Owens @ 2001-12-27  4:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arm-kernel

I plan to stop using section .text.lock for out of line code.  Using a
special section for out of line code can generate dangling refernces to
discarded sections, the dangling references are flagged as an error by
binutils 2.11.92.0.12 onwards.  See the l-k discussion in thread
http://marc.theaimsgroup.com/?l=linux-kernel&m=100909932003300&w=2

After the above discussion there is general agreement (well, nobody
disagreed) that .text.lock can be replaced with .subsection 1.  It
still gives out of line code but without the dangling reference problem
because all references are within the same section.  It can even
generate better code, intra section branches can be smaller than inter
section branches.

I am going through 2.4.18-pre1 looking at all references to .text.lock
and converting them, removing vmlinux.lds entries and dead comments at
the same time.  Most of the changes are obvious, only i386, ia64, m68k
and arm are really using .text.lock, the rest are copy and paste lines
in vmlinux.lds and are already redundant.

ARM is a problem.  It does not use .text.lock for spinlocks (UP only),
instead it uses .text.lock for __do_softirq, __down_failed and friends.
AFAICT this is completely pointless, these routines only occur once so
they are already out of line.  .text.lock should be used for the code
that calls these functions and only on the fail path, I see no point in
putting the functions themselves in .text.lock.  Can somebody explain
why these arm functions are in section .text.lock instead of normal
.text?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-27  4:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-27  4:10 [RFC] Remove section .text.lock Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®