Skip to content

Commit ada1681

Browse files
committed
nhm-tool: parse ldd outputs of older formats [ci skip]
in those formats the separator may occur between the library and the address like in `linux-vdso.so.1 => (0x00007fffd33f2000)`
1 parent d059b52 commit ada1681

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

haskell/ngx-export-distribution/Changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### 0.5.1.2
2+
3+
- Parse *ldd* outputs of older formats where the separator may occur between the
4+
library and the address like in *linux-vdso.so.1 => (0x00007fffd33f2000)*.
5+
16
### 0.5.1.1
27

38
- Collect *libffi* library unconditionally.

haskell/ngx-export-distribution/ngx-export-distribution.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: ngx-export-distribution
2-
version: 0.5.1.1
2+
version: 0.5.1.2
33
synopsis: Build custom libraries for Nginx haskell module
44
description: Build custom libraries for
55
<https://github.com/lyokha/nginx-haskell-module Nginx haskell module>.

haskell/ngx-export-distribution/nhm-tool.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,8 @@ parseLddOutput = flip parse "ldd" $ many $
358358
<|> Nothing <$ string "not found"
359359
)
360360
)
361-
-- FIXME: in some documents, vdso record has an arrow in the middle
362-
-- linux-vdso.so.1 => (0x00007fffd33f2000)
363-
-- this format is not supported here, not sure if it should be.
364-
<|> (`LibOther` Nothing) <$> right
361+
<|> try ((`LibOther` Nothing) <$> right)
362+
<|> (`LibOther` Nothing) <$> manyTill anyChar' (sep *> addr *> newline)
365363
)
366364
where toLddRec lib | "libHS" `isPrefixOf` lib = LibHS lib
367365
| "libffi.so" `isPrefixOf` lib = LibFFI lib

0 commit comments

Comments
 (0)