DNS server IP address in /usr/sbin/NetworkManager

I had DNS server issues and realized that the IP address of the used DNS server is one of the strings of /usr/sbin/NetworkManager. I haven’t got the chance to compare it with my home installation yet.

What I did.

  1. dig google.com to find out which dns-server is being used -> $ DNS_SERVER
  2. Next I did sudo grep -rnw '/' -e $ DNS_SERVER
  3. After I saw the binary coming up i did strings usr/sbin/NetworkManager | grep $ DNS_SERVER which means to me that the IP address of the DNS server used is hard-coded in the binary.

Can someone explain how a theoretically dynamic string becomes part of a binary file?