bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/13617] New: gold's nop padding should contain only valid nop i


From: roland at gnu dot org
Subject: [Bug gold/13617] New: gold's nop padding should contain only valid nop instructions, not zeros
Date: Mon, 23 Jan 2012 19:25:16 +0000

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

             Bug #: 13617
           Summary: gold's nop padding should contain only valid nop
                    instructions, not zeros
           Product: binutils
           Version: 2.23 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: address@hidden
        ReportedBy: address@hidden
                CC: address@hidden
    Classification: Unclassified


This is related to http://sourceware.org/bugzilla/show_bug.cgi?id=13616 (a
BFD ld bug).  In the same case, gold is trying to do the right thing.  But
it's not quite right:

    $ cat foo.s
    .section code1,"ax",@progbits
    .align 32
        ret
    $ ./gas/as-new -o pad.o pad.s
    $ ./gold/ld-new -o gfoo foo.o foo.o
    $ objdump -rd gfoo

    gfoo:     file format elf64-x86-64


    Disassembly of section code1:

    00000000004000c0 <code1>:
      4000c0:    c3                       retq   
      4000c1:    e9 1a 00 00 00           jmpq   4000e0 <__bss_start-0xf20>
        ...
      4000de:    00 00                    add    %al,(%rax)
      4000e0:    c3                       retq   
    $

Using a "jump around the gap" instruction for nop padding is fine in theory.
But the instructions inside the gap should be nops too, not zeros.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]