lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Oct 2010 21:01:42 +0530
From:	Anand Gadiyar <gadiyar@...com>
To:	oprofile-list@...ts.sf.net, linux-kernel@...r.kernel.org
Cc:	Anand Gadiyar <gadiyar@...com>, Will Deacon <will.deacon@....com>,
	Robert Richter <robert.richter@....com>
Subject: [PATCH 2/2] oprofile: fix linker errors

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@...com>
Cc: Will Deacon <will.deacon@....com>
Cc: Robert Richter <robert.richter@....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 */
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ