Bug 14150 - get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}
Summary: get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 2.17
Assignee: Marek Polacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-23 22:07 UTC by Roland McGrath
Modified: 2014-06-19 16:05 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
Untested fix (9.03 KB, patch)
2012-07-27 17:06 UTC, Marek Polacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roland McGrath 2012-05-23 22:07:59 UTC
We only support ELF now, so ASM_TYPE_DIRECTIVE is no longer necessary--we can just use .type unconditionally.

We require fairly recent binutils and don't attempt to support non-GNU assemblers.  GAS recognizes any of @ # % as the prefix for the type name.  Of these, @ and # are the comment characters on some machines, but % works (AFAIK) for every machine.  So we can get rid of ASM_TYPE_DIRECTIVE_PREFIX and just use % everywhere.  GAS also supports the syntax: .type SYMBOL,"TYPE" (with double-quotes) so that could be the new norm, though % seems slightly preferable to me.

This could be done in multiple stages, but it's probably not worth dragging it out.
1. Remove the configure test and just define the macro unconditionally either in config.h.in or in libc-symbols.h (for each macro, could even be 1a and 1b steps).
2. Change all uses of the macro to just use direct assembler syntax.
3. Remove the macro.
Comment 1 Marek Polacek 2012-07-09 11:44:50 UTC
Mine.
Comment 2 Marek Polacek 2012-07-27 17:06:15 UTC
Created attachment 6560 [details]
Untested fix
Comment 3 Marek Polacek 2012-08-02 19:08:28 UTC
Fixed.