This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
call gcc no -fpic/-fpie only -pie?
- From: zet <feqin1023 at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 28 Jun 2016 17:26:55 +0800
- Subject: call gcc no -fpic/-fpie only -pie?
- Authentication-results: sourceware.org; auth=none
hello, All
If I call
```
gcc -pie test.c
```
-pie will be the arguments of collect2 then ld.
I have test some programs, they are works.
But the ld manual said if specify -pie should specify -fpic etc.
static relocation type only has R_386_32/R_386_PC32, they should be
changed to dynamic relocation type R_386_COPY/R_386_GLOB_DAT etc by
ld. If so why not manual said that( if specify -pie should specify
-fpic etc) ? If not , what the details that cannot be changed to
dynamic link?
like the -pie there is a similar option -shared, under the same
questions what about -shared?
thanks, my regards
zet
--
äçäå,èäå.