This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding % directives for use with constant tables


Hi Nick,

> I would like to add %data() and %insn() directives that can be used in
> constant table (ip2k port) - eg:
>
> .word    %insn(foo)
> .word    %data(bar)
>
> The % directives I have added in the past have been added to the operand
> parse function on a per opcode basis... How would I go about adding this
> feature either generally or specifically for const tables?

If you only need this feature for .word directives (and similar ones,
ie .short, .long etc) then you can provide your own function to parse
them.  For example look at gas/config/tc-arm.c where it traps them in
the md_pseudo_table[] and then handles them in s_arm_elf_cons().

Cheers
        Nick
        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]