For example, if I have two files `foo.c` and `bar.o`, and `foo.c` contains a function `foo()` that references a function `bar()` in `bar.o`:

```
int foo(int x) { x = bar(x); /* ... */ }

```

How can I compile a static or dynamic library that exposes `foo()`, but does not expose `bar()`? In other words, I want `bar()` to be linked only inside the library.