how to remove notes section from a shared object using ld flags for GCC?

0

readelf -n sharedobject.so gives the following data. overlap of NOTE(.note.android.ident) and LOAD is seen at address 0x1148 in physAddr which need to be avoided for 3rd party tool using shared object as input.

How NOTE section be avoided using LDFLAGS in GCC. strip -R on shared object throws the error " strip: Unable to recognise the format of the input file"

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x00001034 0x00001034 0x00100 0x00100 R   0x4
  INTERP         0x000134 0x00001134 0x00001134 0x00013 0x00013 R   0x1
      [Requesting program interpreter: /system/bin/linker]
  **LOAD**           0x000000 0x00001000 **0x00001000** 0x24d7a0 0x24d7a0 R E 0x1000
  LOAD           0x24e000 0x0024f000 0x0024f000 0x06968 0x06f54 RW  0x1000
  DYNAMIC        0x24e000 0x0024f000 0x0024f000 0x00120 0x00120 RW  0x4
  **NOTE**           0x000148 0x00001148 **0x00001148** 0x00018 0x00018 R   0x4
android
asked on Stack Overflow Aug 7, 2017 by Gangadhar Reddy • edited Aug 7, 2017 by LethalProgrammer

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0