# CONFIG_TRIM_UNUSED_KSYMS && out of the kernel tree modules

## CaptainBlood

Hi,

I have an out of the tree kernel module which compilation requires CONFIG_TRIM_UNUSED_KSYMS desactivation.

Does anyone knows how to tweak the kernel in order to keep some symbols visible when CONFIG_TRIM_UNUSED_KSYMS  is activaeted.

Thks 4 ur attention.

----------

## cdstealer

I had to disable the kernel option for Trim (leave module support enabled):

```
[*] Enable loadable module support  --->

    [ ]   Trim unused exported kernel symbols
```

But I'm not sure what to suggest if you want it enabled?

----------

## CaptainBlood

By tweaking I mean to poke into the kernel package to force some specific unused exported kernel symbols to be considered as used, therefore not removed @ build time by activated CONFIG_TRIM_UNUSED_KSYMS.

Thks 4 ur attention, interest & support.Last edited by CaptainBlood on Tue Jul 04, 2017 12:07 am; edited 1 time in total

----------

## Hu

As I understand it, CONFIG_TRIM_UNUSED_KSYMS=y trims symbols and CONFIG_TRIM_UNUSED_KSYMS=n keeps them.  You said your out-of-tree module requires CONFIG_TRIM_UNUSED_KSYMS=n, so the symbols should already be kept without further work by you, once you set that option as required.

----------

