Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 31st, 2012  |  syntax: None  |  size: 0.87 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How does adding a private member variable break C   ABI compatibility?
  2. aguthrie@ana:~/pimpl$ objdump -d -j .text a.out
  3. 08048874 <main>:
  4. ...
  5.  8048891:   e8 b2 fe ff ff          call   8048748 <_ZN9Interface11some_methodEv@plt>
  6.        
  7. aguthrie@ana:~/pimpl$ objdump -d -j .plt a.out
  8.  
  9. 08048748 <_ZN9Interface11some_methodEv@plt>:
  10.  8048748:   ff 25 1c a0 04 08       jmp    *0x804a01c
  11.  804874e:   68 38 00 00 00          push   $0x38
  12.  8048753:   e9 70 ff ff ff          jmp    80486c8 <_init+0x30>
  13.        
  14. aguthrie@ana:~/pimpl$ readelf -x 24 a.out
  15.  
  16. Hex dump of section '.got.plt':
  17.   0x08049ff4 089f0408 00000000 00000000 de860408 ................
  18.   0x0804a004 ee860408 fe860408 0e870408 1e870408 ................
  19.   0x0804a014 2e870408 3e870408 4e870408 5e870408 ....>...N...^...
  20.   0x0804a024 6e870408 7e870408 8e870408 9e870408 n...~...........
  21.   0x0804a034 ae870408                            ....