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: More i386 architectures?


> 
> Here is a first pass at implementing an architecture note for x86, and
> a bug-fix for obj-elf.c I noticed.  I'm checking in the bug-fix, but
> waiting for comments on i386_elf_emit_arch_note. :)  The note will only
> be emitted if an ".arch" directive is encountered in the source file,
> and the last ".arch" directive wins.  Please ignore the other random
> bug-fixes in tc-i386.c
> 
> gas/ChangeLog
> 	* config/tc-i386.h (md_end): Define.
> 	(i386_elf_emit_arch_note): Declare.
> 	(CpuUnknown): Delete.
> 	* config/tc-i386.c (default_arch): Constify.
> 	(smallest_imm_type): Remove CpuUnknown test.
> 	(md_assemble): Don't bother checking cpu_arch_flags non-zero.
> 	(i386_elf_emit_arch_note): New function.
> 
> 	* config/obj-elf.c (obj_elf_version): Ensure terminating NUL is
> 	put in note section.  Use sizeof instead of hard-coded constants.
> 
> include/elf/ChangeLog
> 	* common.h (NT_ARCH): Define.  Remove incorrect comment.
> 

....

> +      strcpy (p, cpu_arch_name);

I wonder what cpu_arch_name is.  Hmm, "i8086", ....., "sledgehammer", 
...  One thought is to use names found in archures so that GDB can 
continue to use BFD to do lookups etc on them.  Another is to formalize 
the interface to that table.  Either way the objective is to provide a 
consistent namespace across GAS, OBJDUMP and GDB.

If the user specifies an option something like -mi8066, does that also 
set cpu_arch_name and hence select the architecture?

W.r.t. linking, if there were multiple .note sections then they would be 
concatenated (in command line order)?  That leaves GDB to do what ever 
it likes - probably just taking the first one so that its behavour was 
similar to MIPS.

Definitly like it.  Perhaphs we should share with other architectures 
with similar limiations.

Andrew



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