Bug 25768 - .stab: sh_size%sh_entsize!=0 for 64-bit architectures
Summary: .stab: sh_size%sh_entsize!=0 for 64-bit architectures
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.35
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-03 05:14 UTC by Fangrui Song
Modified: 2020-04-14 14:23 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fangrui Song 2020-04-03 05:14:12 UTC
sh_entsize(.stab) seems to be wrong since "19990502 sourceware import".

https://sourceware.org/pipermail/binutils/2020-April/110529.html can probably fix it. I noticed that

#define STRDXOFF (0)
#define TYPEOFF (4)
#define OTHEROFF (5)
#define DESCOFF (6)
#define VALOFF (8)
#define STABSIZE (12)

are duplicated in 4 places. A future clean-up can merge them.
Comment 1 cvs-commit@gcc.gnu.org 2020-04-14 14:22:32 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=34ca55313b8e6c0f6354f2dc5a3a35e38c32ae82

commit 34ca55313b8e6c0f6354f2dc5a3a35e38c32ae82
Author: Fangrui Song <maskray@google.com>
Date:   Tue Apr 14 15:21:50 2020 +0100

    The assembler only supports 32-bit stabs. So set sh_entsize unconditionally to 12.
    
            PR gas/25768
            * elf.c (assign_section_numbers): Always set .stab sh_entsize to
            12.
Comment 2 Nick Clifton 2020-04-14 14:23:09 UTC
Patch applied.