From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5503A3858D34; Fri, 26 Jun 2020 13:00:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5503A3858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593176436; bh=wHR2+5ouyNELAgi4rQae8TnMaed1VkmEhq8ysvEHrC0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OQ+q9Bw5uLt3JZrRAB8eH7FGThtjViKKcLdL99unO185vdxcljmNnmRxB4ylHkPuA FwOeRkLbr1tryUbMc3L/CIm8RwO9bRmcIcB6kaCbP4k2idVtNyfzmaGsIWgd8s5amq AdUOv4pLTwSottSwvY8jHFbSKjbDDtoD4NfPe+f8= From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/95620] [10/11 Regression] relocation truncated to fit: R_X86_64_PC32 against `.bss' Date: Fri, 26 Jun 2020 13:00:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: link-failure, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 13:00:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95620 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hjl.tools at gmail dot com --- Comment #3 from H.J. Lu --- (In reply to Martin Li=C5=A1ka from comment #2) > So it's really problem as with LTO we don't put the large array into .lbss > section: >=20 > LTO: > .file "" > .text > .local a > .comm a,2830270464,32 ^^^^ This should be .largecomm. [hjl@gnu-cfl-2 tmp]$ cat x.s .local a .largecomm a,2830270464,32 [hjl@gnu-cfl-2 tmp]$ gcc -c x.s=20 [hjl@gnu-cfl-2 tmp]$ readelf -SsW x.o There are 9 section headers, starting at offset 0x160: Section Headers: [Nr] Name Type Address Off Size ES = Flg Lk Inf Al [ 0] NULL 0000000000000000 000000 000000 00= =20=20=20=20=20 0 0 0 [ 1] .text PROGBITS 0000000000000000 000040 000000 00 = AX=20 0 0 1 [ 2] .data PROGBITS 0000000000000000 000040 000000 00 = WA=20 0 0 1 [ 3] .bss NOBITS 0000000000000000 000040 000000 00 = WA=20 0 0 1 [ 4] .lbss NOBITS 0000000000000000 000040 a8b28000 00 WAl 0 0 32 [ 5] .note.gnu.property NOTE 0000000000000000 000040 000030 00= A 0 0 8 [ 6] .symtab SYMTAB 0000000000000000 000070 0000a8 18= =20=20=20=20=20 7 7 8 [ 7] .strtab STRTAB 0000000000000000 000118 000003 00= =20=20=20=20=20 0 0 1 [ 8] .shstrtab STRTAB 0000000000000000 00011b 000045 00= =20=20=20=20=20 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), I (info), L (link order), O (extra OS processing required), G (group), T (TLS), C (compressed), x (unknown), o (OS specific), E (exclude), l (large), p (processor specific) Symbol table '.symtab' contains 7 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND=20 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1=20 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2=20 3: 0000000000000000 0 SECTION LOCAL DEFAULT 3=20 4: 0000000000000000 0xa8b28000 OBJECT LOCAL DEFAULT 4 a 5: 0000000000000000 0 SECTION LOCAL DEFAULT 4=20 6: 0000000000000000 0 SECTION LOCAL DEFAULT 5=20 [hjl@gnu-cfl-2 tmp]$=