Issue Details (XML | Word | Printable)

Key: PCC-421
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

section attribute does not provide correct flag for functions

Created: 10/Apr/14 11:21 PM   Updated: 19/Apr/14 09:48 AM
Component/s: C frontend, i386 target, pcc backend
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD 6.99.40/i386

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

void __attribute__ ((__section__(""))) foo(void)

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

        .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

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson made changes - 19/Apr/14 05:57 AM
Field Original Value New Value
Assignee Anders Magnusson [ ragge ]
Anders Magnusson made changes - 19/Apr/14 09:48 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]