svn commit: r269143 - head/usr.bin/elfdump

Ed Maste emaste at freebsd.org
Thu Jul 31 15:43:52 UTC 2014


On 26 July 2014 16:00, Ian Lepore <ian at freebsd.org> wrote:
>> +             case EM_ARM:
>> +                     switch (sht) {
>> +                     case 0x70000001: return "SHT_ARM_EXIDX";
>> +                     case 0x70000002: return "SHT_ARM_PREEMPTMAP";
>> +                     case 0x70000003: return "SHT_ARM_ATTRIBUTES";
>> +                     case 0x70000004: return "SHT_ARM_DEBUGOVERLAY";
>> +                     case 0x70000005: return "SHT_ARM_OVERLAYSECTION";
>> +                     }
>> +                     break;
>>               case EM_MIPS:
>>                       switch (sht) {
>>                       case 0x7000000d: return "SHT_MIPS_OPTIONS";
>>
>
> I'm curious why this code is all full of 0xnnnnnnnn numbers when there
> are named constants defined for all this stuff.

I don't think there's a good reason for it.  It seems to have just
evolved that way after sh_types() and d_tags() switched from an array
of names, when the first non-contiguous entries were added.  In
r269338 I've replaced the constants with #defines that exist.


More information about the svn-src-all mailing list