Lines 1709-1714
add_symbols_from(
Link Here
|
1709 |
struct new_module_symbol *s; |
1709 |
struct new_module_symbol *s; |
1710 |
size_t i; |
1710 |
size_t i; |
1711 |
int used = 0; |
1711 |
int used = 0; |
|
|
1712 |
int gpl = obj_gpl_license(f, NULL) == 0; |
1712 |
|
1713 |
|
1713 |
for (i = 0, s = syms; i < nsyms; ++i, ++s) { |
1714 |
for (i = 0, s = syms; i < nsyms; ++i, ++s) { |
1714 |
|
1715 |
|
Lines 1717-1722
add_symbols_from(
Link Here
|
1717 |
We will also create a false dependency on the module. */ |
1718 |
We will also create a false dependency on the module. */ |
1718 |
struct obj_symbol *sym; |
1719 |
struct obj_symbol *sym; |
1719 |
|
1720 |
|
|
|
1721 |
/* GPL licensed modules can use symbols exported with |
1722 |
* EXPORT_SYMBOL_GPL, so ignore any GPLONLY_ prefix on the |
1723 |
* exported names. Non-GPL modules never see any GPLONLY_ |
1724 |
* symbols so they cannot fudge it by adding the prefix on |
1725 |
* their references. |
1726 |
*/ |
1727 |
if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) { |
1728 |
if (gpl) |
1729 |
((char *)s->name) += 8; |
1730 |
else |
1731 |
continue; |
1732 |
} |
1733 |
|
1720 |
sym = obj_find_symbol(f, (char *) s->name); |
1734 |
sym = obj_find_symbol(f, (char *) s->name); |
1721 |
if (sym && !ELFW(ST_BIND) (sym->info) == STB_LOCAL) { |
1735 |
if (sym && !ELFW(ST_BIND) (sym->info) == STB_LOCAL) { |
1722 |
sym = obj_add_symbol(f, (char *) s->name, -1, |
1736 |
sym = obj_add_symbol(f, (char *) s->name, -1, |