binutils/stabs.c fixes

Steve deRosier sderosier@vari-lite.com
Tue Jan 30 13:30:00 GMT 2001


>> + #ifdef HAVE_DOS_BASED_FILE_SYSTEM
>>         backslash = strrchr (modname, '\\');
>> !       if (modname == NULL || (backslash != NULL && backslash > modname))
>>    modname = backslash;
>> + #endif
>
> Blech. There, I said it and I feel much better now. Many places in binutils
> now use similiar code. I'd like to replace that mess with either a) basename
> or b) a new bfd function unless I'm missing something.
I agree with your point but I don't know what a good solution would be. It
seems that most of this type of construct is to be optionally compatible
with MS file system path names, and as such would either necessitate
separating the respective source into DOS and Unix variants, some sort of
"fix paths" function or module (which would then necessitate fixing up all
the code to use it), or some thing similar to that.

The point of BFD is to provide a translation system for object formats
right?  As near as I can tell it allows you to read a particular object
format into a neutral data structure, and then to output it into another
format.  Please correct me if I am wrong, but that was my impression of the
purpose of BFD. So--as this has little to do with the object formats, but is
a platform issue, does it make sense to do this in bfd?

basename--I'm not familiar with this term (at least in this type of
context), please explain.

Well, I am not an expert on binutils or bfd source (actually more of a
novice, but learning), but from what I have seen that's my 2 cents.

- Steve


More information about the Binutils mailing list