This also didn't work, but both hints inspired me to the following:
I went back to my initial suspicious line of code:
const char max7219_C_VER[] PROGMEM = "@(#) $Id: max7219.c,v 0.0
2004/01/25 18:58:09Dafni Exp $";
In the linker script for the library *.xr I added the . = ALIGN(2); and
that's it.
/* Internal text space or external memory */
.text :
{
*(.vectors)
*(.progmem.gcc*)
*(.progmem*)
. = ALIGN(2);
*(.init0) /* Start here after reset. */
*(.init1)
...
}
It does not seem to be necessary to add it to .text and .text.* as well,
since all the other stuff is
obviously generated properly.
*(.text)
. = ALIGN(2);
*(.text.*)
. = ALIGN(2);
So the solution is so simple.
BTW the standard linker scripts, which come with winavr should be corrected
as well IMHO.