View | Details | Raw Unified | Return to bug 3248
Collapse All | Expand All

(-)busybox/insmod.c.orig (+16 lines)
Lines 607-612 static enum obj_reloc arch_apply_relocat Link Here
607
607
608
static void arch_create_got (struct obj_file *f);
608
static void arch_create_got (struct obj_file *f);
609
609
610
static int obj_gpl_license(struct obj_file *f, const char **license);
611
610
#ifdef BB_FEATURE_NEW_MODULE_INTERFACE
612
#ifdef BB_FEATURE_NEW_MODULE_INTERFACE
611
static int arch_init_module (struct obj_file *f, struct new_module *);
613
static int arch_init_module (struct obj_file *f, struct new_module *);
612
#endif
614
#endif
Lines 1709-1714 add_symbols_from( Link Here
1709
	struct new_module_symbol *s;
1711
	struct new_module_symbol *s;
1710
	size_t i;
1712
	size_t i;
1711
	int used = 0;
1713
	int used = 0;
1714
	int gpl = obj_gpl_license(f, NULL) == 0;
1712
1715
1713
	for (i = 0, s = syms; i < nsyms; ++i, ++s) {
1716
	for (i = 0, s = syms; i < nsyms; ++i, ++s) {
1714
1717
Lines 1717-1722 add_symbols_from( Link Here
1717
		   We will also create a false dependency on the module.  */
1720
		   We will also create a false dependency on the module.  */
1718
		struct obj_symbol *sym;
1721
		struct obj_symbol *sym;
1719
1722
1723
		/* GPL licensed modules can use symbols exported with
1724
		 * EXPORT_SYMBOL_GPL, so ignore any GPLONLY_ prefix on the
1725
		 * exported names.  Non-GPL modules never see any GPLONLY_
1726
		 * symbols so they cannot fudge it by adding the prefix on
1727
		 * their references.
1728
		 */
1729
		if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
1730
			if (gpl)
1731
				((char *)s->name) += 8;
1732
			else
1733
				continue;
1734
		}
1735
1720
		sym = obj_find_symbol(f, (char *) s->name);
1736
		sym = obj_find_symbol(f, (char *) s->name);
1721
		if (sym && !ELFW(ST_BIND) (sym->info) == STB_LOCAL) {
1737
		if (sym && !ELFW(ST_BIND) (sym->info) == STB_LOCAL) {
1722
			sym = obj_add_symbol(f, (char *) s->name, -1,
1738
			sym = obj_add_symbol(f, (char *) s->name, -1,

Return to bug 3248