# Rust Error for mach-o section specifier requires a segment and section separated by comma

> How to fix a Rust embed error "LLVM ERROR: Global variable '__INTERRUPTS' has an invalid section specifier '.vector_table.interrupts': mach-o section specifier requires a segment and section separated by a comma.error: could not compile `rp2040-pac` (lib)

Source: https://curiouslychase.com/engineering/rust-error-for-mach-o-section-specifier-requires-a-segment-and-section-separated-by-comma/

Lately I've been learning Rust _and_ Embedded Programming at the same time.

When attempting to build a binary for my [Adafruit Macropad](https://curiouslychase.com/posts/adafruit-macropad/) I kept getting this error:

```
LLVM ERROR: Global variable '__INTERRUPTS' has an invalid section specifier '.vector_table.interrupts': mach-o section specifier requires a segment and section separated by a comma.
error: could not compile `rp2040-pac` (lib)
```

The solution is a _real face palm_...

My `.cargo/config` was in my `src` directory and not my project root.

That meant that anytime I ran `cargo run --release` it didn't find a `config` to target my device, so it was building the binary for MacOS.

# Solution

**Make sure that you have your Rust `.cargo/config` for any of the embedded projects you're doing at your project root and not somewhere else in the tree.**

I hope this saves you ton of head scratching. 🤦‍♂️
