Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8450387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:57:20+00:00 2026-06-10T10:57:20+00:00

I need to convert an picture to an object file(.o) use sde-objcopy, then I

  • 0

I need to convert an picture to an object file(.o) use sde-objcopy, then I can use this picture in our no-os system.
I had test the objcopy command, it works well on my PC(Fedora 12). For example, the command below will convert test.jpg to test.o.

objcopy -I binary -O elf32-i386 -B i386 ../stdy/test.jpg test.o

Here are my questions:

A. sde-objcopy doesn’t has the “-B” option to specify the architecture, but if I don’t specify a architecture, it will reponse an warning like this:

$ sde-objcopy -I binary -O elf32-little test.jpg test.o

sde-objcopy: Warning: Output file cannot represent architecture UNKNOWN!

How to fix this warning?

B. It seems that objcopy uses the file’s name to generate symbols in the object file. If I use the full path(such as /home/owner/stdy/test.jpg) as the parameter of objcopy, it will generate long named symbols. Is there any elegant method to fix this issue?

$ objcopy -I binary -O elf32-i386 -B i386 ../stdy/test.jpg test.o

$ nm test.o

00000083 D _binary____stdy_test_jpg_end

00000083 A _binary____stdy_test_jpg_size

00000000 D _binary____stdy_test_jpg_start

$ objcopy -I binary -O elf32-i386 -B i386 test.jpg test.o

$ nm test.o
00000032 D _binary_test_jpg_end

00000032 A _binary_test_jpg_size

00000000 D _binary_test_jpg_start
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:57:21+00:00Added an answer on June 10, 2026 at 10:57 am

    You could use something like:

    # data.s
    .section ".rodata"
    .globl font_data_start, font_data_end
    font_data_start:
    .incbin "Zitz-Regular.ttf"
    font_data_end:
    .size font_data_start, font_data_end - font_data_start
    

    and then access the stuff in your program:

    /* prog.c */
    extern const char font_data_start[], font_data_end[];
    void function() {
        fwrite(font_data_start, font_data_end - font_data_start, 1, stdout);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my project I have an bitmap image. I need to convert this picture
I need convert a String to a decimal in C#, but this string have
See picture here Hello, I need to convert the formula above to code (Java
I need to read image in java. Then I should to convert it to
this is very confusing for me, cannot picture how it can be done. I
I need to convert one object to another...in both cases of a single instance
I need to convert tons of pictures, coming from all kinds of sources, in
I need to convert a String to enum. I followed the idea in String
I need to convert a string vector in a simple string. I do not
I need to convert full state name to its official state address code. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.