<< Back to previous view

[PCC-421] section attribute does not provide correct flag for functions Created: 10/Apr/14  Updated: 19/Apr/14

Status: Resolved
Project: pcc
Component/s: C frontend, i386 target, pcc backend
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Iain Hibbert Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
Environment: NetBSD 6.99.40/i386

the section attribute does not provide the "x" bit for executable code. For example, the code snippet

void __attribute__ ((__section__(".text.foo"))) foo(void)

when compiled with "pcc -S foo.c" produces

        .section .text.foo,"aw",@progbits
        .align 4
        .globl foo
        .type foo,@function
        pushl %ebp
        movl %esp,%ebp
        .size foo,.-foo
        .ident "PCC: pcc 1.1.0.DEVEL 20140410 for netbsd-i386"

but the flags for this section should really be "ax", indicating executable code

Comment by Anders Magnusson [ 19/Apr/14 09:48 AM ]
Fixed now, for all affected targets.
Generated at Sun Oct 04 17:23:10 CEST 2015 using JIRA Enterprise Edition, Version: 3.13.1-#333.