This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CPIC for mips
- From: Andrew Pinski <andrew dot pinski at caviumnetworks dot com>
- To: reed kotler <rkotler at mips dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 12 Feb 2013 15:11:59 -0800
- Subject: Re: CPIC for mips
- References: <511AC6A4.5030600@mips.com>
On Tue, Feb 12, 2013 at 2:48 PM, reed kotler <rkotler@mips.com> wrote:
> CPIC is added to .o files for mips a lot.
This is a better question for the binutils mailing list rather than
the gcc list.
>
> Is that needed?
>
> What is it for?
It says if the object file will call into PIC code.
http://sourceware.org/ml/binutils/2003-05/msg00679.html
http://sourceware.org/ml/binutils/2008-06/msg00280.html
Thanks,
Andrew Pinski
>
> Tia.
>
> Reed
>
> rkotler@ubuntu-rkotler:~/testmips16$ mips-linux-gnu-gcc null.c -c
> mipsrkotler@ubuntu-rkotler:~/testmips16$ mips-linux-gnu-objdump -x null.o
>
> null.o: file format elf32-tradbigmips
> null.o
> architecture: mips:isa32r2, flags 0x00000011:
> HAS_RELOC, HAS_SYMS
> start address 0x00000000
> private flags = 70001005: [abi=O32] [mips32r2] [not 32bitmode] [noreorder]
> [CPIC]
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text 00000030 00000000 00000000 00000040 2**4
> CONTENTS, ALLOC, LOAD, READONLY, CODE
> 1 .data 00000000 00000000 00000000 00000070 2**4
> CONTENTS, ALLOC, LOAD, DATA
> 2 .bss 00000000 00000000 00000000 00000070 2**4
> ALLOC
> 3 .reginfo 00000018 00000000 00000000 00000070 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA, LINK_ONCE_SAME_SIZE
> 4 .pdr 00000020 00000000 00000000 00000088 2**2
> CONTENTS, RELOC, READONLY
> 5 .mdebug.abi32 00000000 00000000 00000000 000000a8 2**0
> CONTENTS, READONLY
> 6 .comment 0000002c 00000000 00000000 000000a8 2**0
> CONTENTS, READONLY
> 7 .gnu.attributes 00000010 00000000 00000000 000000d4 2**0
> CONTENTS, READONLY
> SYMBOL TABLE:
> 00000000 l df *ABS* 00000000 null.c
> 00000000 l d .text 00000000 .text
> 00000000 l d .data 00000000 .data
> 00000000 l d .bss 00000000 .bss
> 00000000 l d .mdebug.abi32 00000000 .mdebug.abi32
> 00000000 l d .reginfo 00000000 .reginfo
> 00000000 l d .pdr 00000000 .pdr
> 00000000 l d .comment 00000000 .comment
> 00000000 l d .gnu.attributes 00000000 .gnu.attributes
> 00000000 g F .text 00000024 main
>
>
> RELOCATION RECORDS FOR [.pdr]:
> OFFSET TYPE VALUE
> 00000000 R_MIPS_32 main
>
>
> rkotler@ubuntu-rkotler:~/testmips16$
>
>