<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/Makefile.build, branch v2.6.28</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.28</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.28'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-10-23T13:58:19Z</updated>
<entry>
<title>ftrace: handle generic arch calls</title>
<updated>2008-10-23T13:58:19Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2008-10-23T13:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dce9d18adde74b8e36b9e4a8a49ddf066bad0b3b'/>
<id>urn:sha1:dce9d18adde74b8e36b9e4a8a49ddf066bad0b3b</id>
<content type='text'>
The recordmcount script requires that the actual arch is passed in.
This works well when ARCH=i386 or ARCH=x86_64 but does not handle the
case of ARCH=x86.

This patch adds a parameter to the function to pass in the number of
bits of the architecture. So that it can determine if x86 should be
run for x86_64 or i386 archs.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>kbuild: ftrace: don't assume that scripts/recordmcount.pl is executable</title>
<updated>2008-10-14T08:36:16Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-08-27T07:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b3a320417484a6d6b9d28098944df58341353992'/>
<id>urn:sha1:b3a320417484a6d6b9d28098944df58341353992</id>
<content type='text'>
CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC      scripts/mod/empty.o
/bin/sh: /usr/src/25/scripts/recordmcount.pl: Permission denied

We shouldn't assume that files have their `x' bits set.  There are various
ways in which file permissions get lost, including use of patch(1).

It might not be correct to assume that perl lives in $PATH?

Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>ftrace: fix build problem with CONFIG_FTRACE</title>
<updated>2008-10-14T08:35:53Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2008-08-18T22:58:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a4917e3ae5194a10e0723f96edc854c381e3063'/>
<id>urn:sha1:6a4917e3ae5194a10e0723f96edc854c381e3063</id>
<content type='text'>
I'm seeing when I use separate src/build dirs:

make[3]: *** [arch/x86/kernel/time_32.o] Error 1
/bin/sh: scripts/recordmcount.pl: No such file or directory
make[3]: *** [arch/x86/kernel/irq_32.o] Error 1
/bin/sh: scripts/recordmcount.pl: No such file or directory
make[3]: *** [arch/x86/kernel/ldt.o] Error 1
/bin/sh: scripts/recordmcount.pl: No such file or directory
make[3]: *** [arch/x86/kernel/i8259.o] Error 1
/bin/sh: scripts/recordmcount.pl: No such file or directory

This fixes it.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>ftrace: create __mcount_loc section</title>
<updated>2008-10-14T08:34:40Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2008-08-14T19:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8da3821ba5634497da63d58a69e24a97697c4a2b'/>
<id>urn:sha1:8da3821ba5634497da63d58a69e24a97697c4a2b</id>
<content type='text'>
This patch creates a section in the kernel called "__mcount_loc".
This will hold a list of pointers to the mcount relocation for
each call site of mcount.

For example:

objdump -dr init/main.o
[...]
Disassembly of section .text:

0000000000000000 &lt;do_one_initcall&gt;:
   0:   55                      push   %rbp
[...]
000000000000017b &lt;init_post&gt;:
 17b:   55                      push   %rbp
 17c:   48 89 e5                mov    %rsp,%rbp
 17f:   53                      push   %rbx
 180:   48 83 ec 08             sub    $0x8,%rsp
 184:   e8 00 00 00 00          callq  189 &lt;init_post+0xe&gt;
                        185: R_X86_64_PC32      mcount+0xfffffffffffffffc
[...]

We will add a section to point to each function call.

   .section __mcount_loc,"a",@progbits
[...]
   .quad .text + 0x185
[...]

The offset to of the mcount call site in init_post is an offset from
the start of the section, and not the start of the function init_post.
The mcount relocation is at the call site 0x185 from the start of the
.text section.

  .text + 0x185  == init_post + 0xa

We need a way to add this __mcount_loc section in a way that we do not
lose the relocations after final link.  The .text section here will
be attached to all other .text sections after final link and the
offsets will be meaningless.  We need to keep track of where these
.text sections are.

To do this, we use the start of the first function in the section.
do_one_initcall.  We can make a tmp.s file with this function as a reference
to the start of the .text section.

   .section __mcount_loc,"a",@progbits
[...]
   .quad do_one_initcall + 0x185
[...]

Then we can compile the tmp.s into a tmp.o

  gcc -c tmp.s -o tmp.o

And link it into back into main.o.

  ld -r main.o tmp.o -o tmp_main.o
  mv tmp_main.o main.o

But we have a problem.  What happens if the first function in a section
is not exported, and is a static function. The linker will not let
the tmp.o use it.  This case exists in main.o as well.

Disassembly of section .init.text:

0000000000000000 &lt;set_reset_devices&gt;:
   0:   55                      push   %rbp
   1:   48 89 e5                mov    %rsp,%rbp
   4:   e8 00 00 00 00          callq  9 &lt;set_reset_devices+0x9&gt;
                        5: R_X86_64_PC32        mcount+0xfffffffffffffffc

The first function in .init.text is a static function.

00000000000000a8 t __setup_set_reset_devices
000000000000105f t __setup_str_set_reset_devices
0000000000000000 t set_reset_devices

The lowercase 't' means that set_reset_devices is local and is not exported.
If we simply try to link the tmp.o with the set_reset_devices we end
up with two symbols: one local and one global.

 .section __mcount_loc,"a",@progbits
 .quad set_reset_devices + 0x10

00000000000000a8 t __setup_set_reset_devices
000000000000105f t __setup_str_set_reset_devices
0000000000000000 t set_reset_devices
                 U set_reset_devices

We still have an undefined reference to set_reset_devices, and if we try
to compile the kernel, we will end up with an undefined reference to
set_reset_devices, or even worst, it could be exported someplace else,
and then we will have a reference to the wrong location.

To handle this case, we make an intermediate step using objcopy.
We convert set_reset_devices into a global exported symbol before linking
it with tmp.o and set it back afterwards.

00000000000000a8 t __setup_set_reset_devices
000000000000105f t __setup_str_set_reset_devices
0000000000000000 T set_reset_devices

00000000000000a8 t __setup_set_reset_devices
000000000000105f t __setup_str_set_reset_devices
0000000000000000 T set_reset_devices

00000000000000a8 t __setup_set_reset_devices
000000000000105f t __setup_str_set_reset_devices
0000000000000000 t set_reset_devices

Now we have a section in main.o called __mcount_loc that we can place
somewhere in the kernel using vmlinux.ld.S and access it to convert
all these locations that call mcount into nops before starting SMP
and thus, eliminating the need to do this with kstop_machine.

Note, A well documented perl script (scripts/recordmcount.pl) is used
to do all this in one location.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>kbuild: fix some minor typoes</title>
<updated>2008-04-25T18:18:48Z</updated>
<author>
<name>Robert P. J. Day</name>
<email>rpjday@crashcourse.ca</email>
</author>
<published>2008-02-18T09:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3156fd0529b5216f4f444f4a7752b82dc1bd99c0'/>
<id>urn:sha1:3156fd0529b5216f4f444f4a7752b82dc1bd99c0</id>
<content type='text'>
Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: introduce new option to enhance section mismatch analysis</title>
<updated>2008-01-28T22:21:18Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-01-21T20:31:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=91341d4b2c196c689acf90e9e96f28f8d5c6665f'/>
<id>urn:sha1:91341d4b2c196c689acf90e9e96f28f8d5c6665f</id>
<content type='text'>
Setting the option DEBUG_SECTION_MISMATCH will
report additional section mismatch'es but this
should in the end makes it possible to get rid of
all of them.

See help text in lib/Kconfig.debug for details.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: implement modules.order</title>
<updated>2008-01-28T22:14:35Z</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2007-12-07T12:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=551559e13af1ccd19d0525cb2b0f308905170647'/>
<id>urn:sha1:551559e13af1ccd19d0525cb2b0f308905170647</id>
<content type='text'>
When multiple built-in modules (especially drivers) provide the same
capability, they're prioritized by link order specified by the order
listed in Makefile.  This implicit ordering is lost for loadable
modules.

When driver modules are loaded by udev, what comes first in
modules.alias file is selected.  However, the order in this file is
indeterministic (depends on filesystem listing order of installed
modules).  This causes confusion.

The solution is two-parted.  This patch updates kbuild such that it
generates and installs modules.order which contains the name of
modules ordered according to Makefile.  The second part is update to
depmod such that it generates output files according to this file.

Note that both obj-y and obj-m subdirs can contain modules and
ordering information between those two are lost from beginning.
Currently obj-y subdirs are put before obj-m subdirs.

Sam Ravnborg cleaned up Makefile modifications and suggested using awk
to remove duplicate lines from modules.order instead of using separate
C program.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: Bill Nottingham &lt;notting@redhat.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Jon Masters &lt;jonathan@jonmasters.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: introduce ccflags-y, asflags-y and ldflags-y</title>
<updated>2007-10-15T20:25:06Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@neptun.(none)</email>
</author>
<published>2007-10-15T20:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f77bf01425b11947eeb3b5b54685212c302741b8'/>
<id>urn:sha1:f77bf01425b11947eeb3b5b54685212c302741b8</id>
<content type='text'>
Introduce ccflags-y, asflags-y and ldflags-y so we soon can
deprecate use of EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
This patch does not touch any in-tree users - thats next round.
Lets get this committed first and then fix the users of the
soon to be deprecated variants next.

The rationale behind this change is to introduce support for
makefile fragments like:

ccflags-$(CONFIG_WHATEVER_DEBUG) := -DDEBUG

As a replacement for the uglier:
ifeq ($(CONFIG_WHATEVER_DEBUG),y)
        EXTRA_CFLAGS := -DDEBUG
endif

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: check for wrong use of CFLAGS</title>
<updated>2007-10-14T20:26:53Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@neptun.(none)</email>
</author>
<published>2007-10-14T20:26:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c53c8e6eb456cde30f2305421c605713856abc8'/>
<id>urn:sha1:0c53c8e6eb456cde30f2305421c605713856abc8</id>
<content type='text'>
External modules have in a few cases modifed gcc option
by modifying CFLAGS. This has never been documented and
was a bad practice.
With the check to use KBUILD_CFLAGS it will no longer work
so we better error out and tell what was wrong as a service
to the external module users.

This check can be overruled if
KBUILD_NOPEDANTIC is set to something.
Addid this possibility may allow older external
module to build without any code modifications but potentially
only loosing some un-important gcc options.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: kill backward compatibility checks</title>
<updated>2007-10-12T19:20:32Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@neptun.(none)</email>
</author>
<published>2007-09-30T18:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=836caba77c290a62743fa9c5a69ed9605ec9cb28'/>
<id>urn:sha1:836caba77c290a62743fa9c5a69ed9605ec9cb28</id>
<content type='text'>
These checks has been present for several kernel releases (&gt; 5).
So lets just get rid of them.
With this we no longer check for use of:
EXTRA_TARGETS, O_TARGET, L_TARGET, list-multi, export-objs

There were three remaining in-tree users of O_TARGET in some
unmaintained sh64 code - mail sent to the maintainer + list.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
</feed>
