https://sourceware.org/bugzilla/show_bug.cgi?id=30508

            Bug ID: 30508
           Summary: warning: empty loadable segment detected at
                    vaddr=0x400000, is this intentional?
           Product: binutils
           Version: 2.41 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

[hjl@gnu-cfl-3 removed-1]$ cat start.s
        .text
        .global start   /* Used by SH targets.  */
start:
        .global _start
_start:
        .global __start
__start:
        .global main    /* Used by HPPA targets.  */
main:
        .globl  _main   /* Used by LynxOS targets.  */
_main:
        .dc.a 0
        .section foo,"ax",%progbits
        .dc.a 0
[hjl@gnu-cfl-3 removed-1]$ make
as -mx86-used-note=no -o start.o start.s
ld -z separate-code -o start start.o
./objcopy -R foo start start1
./objcopy: start: warning: empty loadable segment detected at vaddr=0x400000,
is this intentional?
[hjl@gnu-cfl-3 removed-1]$ 

The first PT_LOAD segment is added to cover the program headers for
-z separate-code.  When rewriting the program headers, we shouldn't warn
the empty loadable segment which contains the program headers.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to