From: Anand Gadiyar <gadiyar@ti.com>
To: oprofile-list@lists.sf.net, linux-kernel@vger.kernel.org
Cc: Anand Gadiyar <gadiyar@ti.com>, Will Deacon <will.deacon@arm.com>,
Robert Richter <robert.richter@amd.com>
Subject: [PATCH 2/2] oprofile: fix linker errors
Date: Thu, 14 Oct 2010 21:01:42 +0530 [thread overview]
Message-ID: <1287070303-32404-1-git-send-email-gadiyar@ti.com> (raw)
Commit e9677b3ce (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>
Cc: Robert Richter <robert.richter@amd.com>
---
drivers/oprofile/oprofile_perf.c | 2 +-
include/linux/oprofile.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: mainline/drivers/oprofile/oprofile_perf.c
===================================================================
--- mainline.orig/drivers/oprofile/oprofile_perf.c
+++ mainline/drivers/oprofile/oprofile_perf.c
@@ -236,7 +236,7 @@ static int __init init_driverfs(void)
return ret;
}
-static void __exit exit_driverfs(void)
+static void exit_driverfs(void)
{
platform_device_unregister(oprofile_pdev);
platform_driver_unregister(&oprofile_driver);
Index: mainline/include/linux/oprofile.h
===================================================================
--- mainline.orig/include/linux/oprofile.h
+++ mainline/include/linux/oprofile.h
@@ -188,7 +188,7 @@ int oprofile_write_commit(struct op_entr
#ifdef CONFIG_PERF_EVENTS
int __init oprofile_perf_init(struct oprofile_operations *ops);
-void __exit oprofile_perf_exit(void);
+void oprofile_perf_exit(void);
char *op_name_from_perf_id(void);
#endif /* CONFIG_PERF_EVENTS */
next reply other threads:[~2010-10-14 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-14 15:31 Anand Gadiyar [this message]
2010-10-14 15:31 ` [PATCH 1/2] oprofile: include platform_device.h to fix build break Anand Gadiyar
2010-10-15 12:46 ` Robert Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1287070303-32404-1-git-send-email-gadiyar@ti.com \
--to=gadiyar@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oprofile-list@lists.sf.net \
--cc=robert.richter@amd.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®