When debug the function symbols conflicts problem, I find a strange behavior of gcc i couldn't understand, illustrate by the following sample code:

main.c

```
#include <stdio.h>
int  main()
{
   b();
   a();
}

```

a.c

```
#include <stdio.h>
void  a(void)
{
   printf("func a in a\n");
}

```

b.c

```
#include <stdio.h>

void a()
{
   printf("func a in b\n");
}
void b()
{
  printf( "func b try to call a  \n");
  a();
}

```

compile: 

```
gcc -c a.c
gcc -c b.c
ar -cr liba.a a.o
ar -cr libb.a b.o
gcc main.c liba.a libb.a

```

execute:

```
./a.out
func b try to call a  
func a in b
func a in b   

```

My question is : 

* Why calling function `a` in `main` function is `a in b.c` instead of `a in a.c` ?
* After change the library order: `gcc main.c libb.a liba.a`, the result is the same. Why?
* Why the linker don't report symbol conflict in this situation?