]> git.baikalelectronics.ru Git - kernel.git/commit
oprofile: fix linker errors
authorAnand Gadiyar <gadiyar@ti.com>
Thu, 14 Oct 2010 15:31:42 +0000 (11:31 -0400)
committerRobert Richter <robert.richter@amd.com>
Fri, 15 Oct 2010 10:45:44 +0000 (12:45 +0200)
commit473dbee1b55f8fe05cf876a6d5d5f837fdb5e95b
tree673b271644137b60eeabbd8ad0ba133735d84c3f
parentb7896bd23516a23f72bdb20df19fddf6e4b31a39
oprofile: fix linker errors

Commit 133c56aaa (oprofile, ARM: Use oprofile_arch_exit() to
cleanup on failure) caused oprofile_perf_exit to be called
in the cleanup path of oprofile_perf_init. The __exit tag
for oprofile_perf_exit should therefore be dropped.

The same has to be done for exit_driverfs as well, as this
function is called from oprofile_perf_exit. Else, we get
the following two linker errors.

  LD      .tmp_vmlinux1
`oprofile_perf_exit' referenced in section `.init.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
make: *** [.tmp_vmlinux1] Error 1

  LD      .tmp_vmlinux1
`exit_driverfs' referenced in section `.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
drivers/oprofile/oprofile_perf.c
include/linux/oprofile.h