objcopy.md 891 B

objcopy

์˜ค๋ธŒ์ ํŠธ ํŒŒ์ผ์˜ ๋‚ด์šฉ์„ ๋‹ค๋ฅธ ํŒŒ์ผ๋กœ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๋” ๋งŽ์€ ์ •๋ณด: https://manned.org/objcopy.

  • ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค๋ฅธ ํŒŒ์ผ๋กœ ๋ณต์‚ฌ:

objcopy {{๊ฒฝ๋กœ/๋Œ€์ƒ/์†Œ์Šค_ํŒŒ์ผ}} {{๊ฒฝ๋กœ/๋Œ€์ƒ/๋ชฉํ‘œ_ํŒŒ์ผ}}

  • ์˜ค๋ธŒ์ ํŠธ ํŒŒ์ผ์„ ํ•œ ํ˜•์‹์—์„œ ๋‹ค๋ฅธ ํ˜•์‹์œผ๋กœ ๋ณ€ํ™˜:

objcopy --input-target={{์ž…๋ ฅ_ํ˜•์‹}} --output-target {{์ถœ๋ ฅ_ํ˜•์‹}} {{๊ฒฝ๋กœ/๋Œ€์ƒ/์†Œ์Šค_ํŒŒ์ผ}} {{๊ฒฝ๋กœ/๋Œ€์ƒ/๋ชฉํ‘œ_ํŒŒ์ผ}}

  • ํŒŒ์ผ์—์„œ ๋ชจ๋“  ์‹ฌ๋ณผ ์ •๋ณด๋ฅผ ์ œ๊ฑฐ:

objcopy --strip-all {{๊ฒฝ๋กœ/๋Œ€์ƒ/์†Œ์Šค_ํŒŒ์ผ}} {{๊ฒฝ๋กœ/๋Œ€์ƒ/๋ชฉํ‘œ_ํŒŒ์ผ}}

  • ํŒŒ์ผ์—์„œ ๋””๋ฒ„๊น… ์ •๋ณด ์ œ๊ฑฐ:

objcopy --strip-debug {{๊ฒฝ๋กœ/๋Œ€์ƒ/์†Œ์Šค_ํŒŒ์ผ}} {{๊ฒฝ๋กœ/๋Œ€์ƒ/๋ชฉํ‘œ_ํŒŒ์ผ}}

  • ์†Œ์Šค ํŒŒ์ผ์—์„œ ํŠน์ • ์„น์…˜์„ ๋Œ€์ƒ ํŒŒ์ผ๋กœ ๋ณต์‚ฌ:

objcopy --only-section {{์„น์…˜}} {{๊ฒฝ๋กœ/๋Œ€์ƒ/์†Œ์Šค_ํŒŒ์ผ}} {{๊ฒฝ๋กœ/๋Œ€์ƒ/๋ชฉํ‘œ_ํŒŒ์ผ}}