According to PE-COFF spec, IMAGE_FILE_RELOCS_STRIPPED means

--
Image only, Windows CE, and Microsoft Windows NT® and later.
This indicates that the file does not contain base relocations
and must therefore be loaded at its preferred base address.
If the base address is not available, the loader reports an
error. The default behavior of the linker is to strip base
relocations from executable (EXE) files.
--

An empty .reloc section is used to create an PIE file:

[...@gnu-6 pr959]$ cat foo.s
        .text
        .globl _start
_start:
        .section .reloc
[...@gnu-6 pr959]$ make
./as   -o foo.o foo.s
./ld -pie -o foo.exe foo.o
./objdump -f foo.exe

foo.exe:     file format pei-x86-64
architecture: i386:x86-64, flags 0x00000133:
HAS_RELOC, EXEC_P, HAS_SYMS, HAS_LOCALS, D_PAGED
start address 0x0000000000401000

But objcopy adds IMAGE_FILE_RELOCS_STRIPPED even if
it doesn't strip any relocations:

./objcopy foo.exe bar.exe
./objdump -f bar.exe

bar.exe:     file format pei-x86-64
architecture: i386:x86-64, flags 0x00000132:
EXEC_P, HAS_SYMS, HAS_LOCALS, D_PAGED
start address 0x0000000000401000

[...@gnu-6 pr959]$

-- 
           Summary: objcopy adds IMAGE_FILE_RELOCS_STRIPPED
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: hjl dot tools at gmail dot com
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=11396

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to