if you tried to link: gcc my_program.o -lB -lA (so, in reverse order)
read: gcc my_program.o -lB -lA (so, in unnatural order)
this looked a bit like: gcc my_program.o -lA -lB
read: "it looked like the order is arbitrary"
BUT what really happened was that the true link command was now: gcc my_program.o -lA -lB -lC -lB
read:gcc my_program.o -lB -lA -lB -lC (so that the symbols of libA *were* resolved)
where the "-lA -lB -lC" is the expansion of the previous "-lA".