bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/24008] New: Wrong value of ternary expression in map file


From: alfedotov at gmail dot com
Subject: [Bug ld/24008] New: Wrong value of ternary expression in map file
Date: Wed, 19 Dec 2018 15:14:54 +0000

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

            Bug ID: 24008
           Summary: Wrong value of ternary expression in map file
           Product: binutils
           Version: 2.32 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: alfedotov at gmail dot com
  Target Milestone: ---

If we have such expression in linker script:

__TESTVAL1__ = 1;
__TESTVAL2__ = 2;
__TESTVAL__ = DEFINED ( __TESTVAL1__ ) ? (__TESTVAL1__) : (__TESTVAL2__);


in final Map file output it always shows "else" branch:
0x00000001  __TESTVAL1__ = 0x1
0x00000002  __TESTVAL2__ = 0x2
0x00000002  __TESTVAL__ = DEFINED (__TESTVAL1__)?__TESTVAL1__:__TESTVAL2__

While disassembling final ELF shows:

00000001 g       *ABS*  00000000 __TESTVAL__
00000001 g       *ABS*  00000000 __TESTVAL1__
00000002 g       *ABS*  00000000 __TESTVAL2__

-- 
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]