Turn Off Linker Warnings with
In some build processes you might want to improve parsing of build output by ignoring linker warnings. You can turn off linker warnings with the
Preserving Compiler Generated Relocation Sections with
The
The following example illustrates that the compiler generated relocation sections (such as
.rela.text, and .rela.IA64_64.unwind) are copied to the output binary with
$ cc
$ ld
$ elfdump
7 RELA 04000740 00000740 0000000c .rela.plt
30RELA 00000000 00010304 00000024 .rela.IA_64.unwind
31RELA 00000000 00010328 0000000c .rela.IA_64.unwind_info
32RELA 00000000 00010334 00000024 .rela.text
34RELA 00000000 00010398 0000000c .rela.debug_line
36RELA 00000000 000103d8 0000000c .rela.debug_actual
39RELA 00000000 00010470 0000003c .rela.debug_procs_info
The following example illustrates that only the linker genereated relocation sections are copied to the output binary if
$ ld main.o
$ elfdump
7 RELA 040006ec 000006ec 0000000c .rela.plt
The compiler generated relocation sections are not copied to the output binary if
52 Determining How to Link Programs or Libraries (Linker Tasks)