// check against section blacklist
string section = get_blacklist_section(addr);
- if (!regexec (&blacklist_section, section.c_str(), 0, NULL, 0))
+ // PR6503: modules don't need special init/exit treatment
+ if (module == TOK_KERNEL && !regexec (&blacklist_section, section.c_str(), 0, NULL, 0))
{
blacklisted = true;
if (sess.verbose>1)
*
* staprun.c - SystemTap module loader
*
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
is open so we won't need the full name again. */
*module_name_end = '\0';
+ /* PR6503. /sys/module/.../sections/...init.... sometimes contain
+ non-0 addresses, even though the respective module-initialization
+ sections were already unloaded. We override the addresses here. */
+ if (strstr (section_name, "init.") != NULL) /* .init.text, .devinit.rodata, ... */
+ section_address = 0;
+
send_a_relocation (module_name, section_name, section_address);
}