title: linked ELF file contains no symbols
body: <p>I compiled my AVR C source-code to object files. These objects contain debug symbols:</p>
  
  <p><code>~ avr-nm code.c.o: 
  00000000 T ClockInit32MhzXtal
  00000000 T CopyDataToSensors
  00000000 T FindSensors
           U I2CInitMaster
  00000000 T PC_UsartInit
  00000000 T ReadFromSensorSettings
  00000000 T ResetAndAlignSampleClock
  00000000 T SampleClockTimerInit
  00000000 T SendDataToPC
  ...
  </code></p>
  
  <p>When linking all files into a single file, these symbols seem to be lost although I specified the -g option: </p>
  
  <p><code>~ /usr/local/bin/avr-gcc  -O1 -lm -Wall -Wstrict-prototypes -Wl,--gc-sections -Wl,-g -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names -DF_CPU=32000000 -mmcu=atxmega128a1u file1.c.o file2.c.o  -o program.elf
  /usr/local/opt/avr-binutils/bin/avr-ld: warning: cannot find entry symbol arch_paths_first; defaulting to 0000000000000000
  ~ avr-nm program.elf
  avr-nm: program.elf: no symbols
  </code></p>
  
  <p>How can this be? Shouldn't the linker create a new symbol table with debug info in the linked file? </p>
  
  <p><code>avr-gcc: gcc version 4.9.3 (GCC)
  avr-ld:  GNU ld (GNU Binutils) 2.25
  </code></p>