Ralf Wildenhues wrote: > Hi Peter, > > * Peter Ekberg wrote on Fri, Sep 02, 2005 at 12:03:14PM CEST: > > > > I'm trying to make sence of the problem with stresstest.at on > > Windows (MinGW, Cygwin and MSVC) where the following symbols > > can't be exported during linking of dlself with -export-symbols > > dlselfsyms: > > > > w1$ > *snip* > > Cool! > > > I have found a fix which makes it work (not correct I think, but > > attached), but I primarily wonder what the original $ sign is > > doing after the w8 symbol in the dlselfsyms file (the added $ > > signs are there to make filtering work, but filtering does not > > happen on Windows). I get the feel that the original $ is > > connected to the first regexp of the sed program at the start > > of the patch context, this first regexp I also don't understand. > > It feels as if there is some way to encode extra (undocumented?) > > information into the symfile. Please tell me what's going on > > here... > > I honestly don't have any idea. I stumbled over a shell parse error > when I looked at the code the last time, did a minimal change to fix > this syntax error, but never understood what this >5 year old code > was supposed to accomplish.
Heh, I searched back in the cvs archives looking for clues, and think the first line of the sed program have been warped in some cleanup... What's there currently is this (minus m4 quotes): -e 's/\([ ][.*^$]\)/\\\1/g' Originally it was: -e 's/\([][.*^$]\)/\\\1/g' Which makes much more sense, it's just a general escape for the later grep, to not have any surprises. (if the symfile is constructed badly or something, I don't really see the need here, but that's irrelevant...) Now I just need someone to explain why the w8 symbol has a $ suffix in the symfile. There is definitely something fishy here, as the $ is passed on from the symfile to the grep command, which doesn't seem like the intended design... So, one of these cases are right: 1. the $ has some meaning to some tool (other than grep) and the $ in w8$ in the test is supposed to be escaped (which it isn't w/o this patch) 2. the $ suffix should just be removed from the test without changing the sed expression (but then the sed expression makes no sense at all, at least not to me) 3. the $ has no meaning to any tool and the $ in w8$ in the test is to be zapped and the symbols in the symfile are supposed to be escaped as a precaution before being used as grep patterns 4. I'm a moron I'm putting my money on 3, so here's a patch that fixes the escape, but not the test. Ok to commit? * libltdl/config/ltmain.m4sh (func_generate_dlsyms): Fix escape expression to actually escape relevant characters from the following grep. Cheers, Peter
head-fix-escape-for-grep.patch
Description: head-fix-escape-for-grep.patch