I have linked some texts files with this command:
ld -r -b binary -o resources1.o *.txt
And I get a file resources.o with this content:
nm resources1.o
00000018 D _binary_texto4_txt_end
00000018 A _binary_texto4_txt_size
00000000 D _binary_texto4_txt_start
00000031 D _binary_texto5_txt_end
00000019 A _binary_texto5_txt_size
00000018 D _binary_texto5_txt_start
0000004a D _binary_texto6_txt_end
00000019 A _binary_texto6_txt_size
00000031 D _binary_texto6_txt_start
I have other resources2.o file comming from another ld command, but it has diferent content:
00000018 D _binary___textos1_texto1_txt_end
00000018 A _binary___textos1_texto1_txt_size
00000000 D _binary___textos1_texto1_txt_start
00000031 D _binary___textos1_texto2_txt_end
00000019 A _binary___textos1_texto2_txt_size
00000018 D _binary___textos1_texto2_txt_start
0000004a D _binary___textos1_texto3_txt_end
00000019 A _binary___textos1_texto3_txt_size
00000031 D _binary___textos1_texto3_txt_start
I would like to combine the two resources.o files in one libSum.a file. So I use this command:
ar rvs libSum.a resources1.o resources2.o
When I link libSum.a to my C program and try to use those texts, I can't beacuse they share the same memory offsets. So binary__textos1_texto1_txt_start have the same direction that _binary_texto4_txt_start (0X00000000).
How could I combine both resource files in one .a lib avoiding memory offset overlapping? Thanks