Absolute assembler output

Hi,

I'm putting together a LLVM based compiler system that has two major use cases. In "normal" mode it generates bc files and in "native" mode it generates native object files.

I'm targeting embedded environments to I'm not very interested in, e.g, shared libraries.

In native mode, the normal compile/generate bc/generate asm/as/ld flow is used.

In bitcode mode the object files are bc files and archives contain bc as well. A program is built by linking the bc files and archives into a single bc file with no external references.

Currently, I generate asm/as/ld the resultant file. I was thinking that it would be interesting to modify gnu as to read a (simplified) linker script file and do the (simplified) locating itself.

Does that sound completely out of whack? If so, maybe a few more cups of coffee will make the idea go away.

-Rich

P.S. In re-reading this email I realize that it is a binutils question more than an LLVM question and therefore off topic. I hope you don't mind that I send it anyway because I value the list's opinion.

P.P.S. It also occurs to me that gnu as may not handle absolute sections at all (getting rid of relocation records, for example), which might mean writing an assembler from scratch may be the way to go.

I recall someone else proposing making the in-progress LLVM direct
object emission code do something like that. It should be feasible,
although I think it's probably not worth the effort.

-Eli